Closed Bug 632429 Opened 13 years ago Closed 3 years ago

mailnews cpp tests don't build (TestImapFlagAndUidState TestImapHdrXferInfo TestMimeCrash TestMsgStripRE)

Categories

(MailNews Core :: Testing Infrastructure, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: Bienvenu, Unassigned)

References

Details

(Whiteboard: [These tests are not built after bug 659205])

Attachments

(1 file)

We have a few .cpp tests that can't currently be xpcshell tests (i.e., can't be written in js). These broke when we switched to libxul builds.
Blocks: 615919
Possible workarounds:

1. Static libxul.a, aka, let's kill your disk space!
2. Conditionally export required test things on ENABLE_TESTS
3. Unconditionally eliminate hidden symbols on ENABLE_TESTS
4. Modify the C++ test framework to add tests to libxul.so.
Note that:
2&3. ENABLE_TESTS is the default
4. We also want to build and run tests for release builds, so this won't work.

In other bugs I've argued that we ought to be figuring out an easy way to let C++ unit tests link directly to the object files they need. Now that we don't actually build static libs, and just use object files everywhere, this is probably feasible.
Summary: mailnews cpp tests don't build → mailnews cpp tests don't build (TestImapFlagAndUidState TestImapHdrXferInfo TestMimeCrash TestMsgStripRE)
Depends on: 659205
Whiteboard: [These tests are not built after bug 659205]
Fortunately, TestMimeCrash can be built.
Attachment #592056 - Flags: review?
Comment on attachment 592056 [details] [diff] [review]
Build TestMimeCrash

Review of attachment 592056 [details] [diff] [review]:
-----------------------------------------------------------------

::: mailnews/mime/Makefile.in
@@ +46,5 @@
>  
>  PARALLEL_DIRS	= public src emitters cthandlers
>  
>  ifdef ENABLE_TESTS
> +TOOL_DIRS += test

Interesting: not using PARALLEL_DIRS here seems to make sense.
In that case, there should be some other cases to fix in
http://mxr.mozilla.org/comm-central/search?string=PARALLEL_DIRS.*test&regexp=on&case=1&find=%2FMakefile

::: mailnews/mime/test/Makefile.in
@@ +47,5 @@
>  XPCSHELL_TESTS = unit
>  
> +CPP_UNIT_TESTS = \
> +               TestMimeCrash.cpp \
> +               $(NULL)

Nit: I suggest to use a single tab instead.
Attachment #592056 - Flags: review? → review?(mbanner)
Comment on attachment 592056 [details] [diff] [review]
Build TestMimeCrash

If we're not doing all of them in this bug, can we do this one in a separate bug so that we're not going to end up with a bug in a limbo state where its part fixed and part not. That's just confusing.
Attachment #592056 - Flags: review?(mbanner)

obsolete?

Flags: needinfo?(mkmelin+mozilla)

Yes we removed those.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(mkmelin+mozilla)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: