Closed Bug 537090 Opened 15 years ago Closed 14 years ago

Tests should pass with a static build

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: joelr, Assigned: joelr)

References

Details

What subset of tests do we want to run with a static build?

It seems to me that xpcom/tests should definitely be included since we want to exercise XPCOM in a static build. Some of the tests under xpcom/tests require xpconnect, though (js/src/xpconnect/src/libxpconnect.a).
A whole lot of tests use #include "nsStringAPI.h". I'm linking test binaries against libxpcore, though, just like firefox-bin. I assume tests need to #include "nsStringGlue.h" when part of a static build.

It's a pain in the rear to place this in every test that needs it

#ifndef MOZILLA_INTERNAL_API
#include "nsStringAPI.h"
#else
#include "nsStringGlue.h"
#endif

I have to do this because nsStringAPI.h complains when used with MOZILLA_INTERNAL_API. Can't nsStringAPI.h include nsStringGlue.h when needed?
It's the other way around. nsStringGlue.h can safely be used everywhere and will include nsStringAPI.h if not MOZILLA_INTERNAL_API.
Tests pass with the latest static build, although I disabled xpcshell. There's a problem on the Try Server, though [1]:

---
/tools/gcc-4.3.3/installed/bin/g++ -o TestObserverService.o -c -I../../dist/system_wrappers -include /builds/slave/sendchange-linux-unittest/mozilla/config/gcc_hidden.h -DMOZILLA_INTERNAL_API -DOSTYPE=\"Linux2.6.18-53.1.19\" -DOSARCH=Linux -D_BUILD_STATIC_BIN=1 -I/builds/slave/sendchange-linux-unittest/mozilla/xpcom/tests/../ds -I/builds/slave/sendchange-linux-unittest/mozilla/xpcom/tests/services  -I/builds/slave/sendchange-linux-unittest/mozilla/xpcom/tests -I. -I../../dist/include -I../../dist/include/nsprpub  -I/builds/slave/sendchange-linux-unittest/mozilla/objdir/dist/include/nspr -I/builds/slave/sendchange-linux-unittest/mozilla/objdir/dist/include/nss      -I../../dist/include/testing  -fPIC  -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -pedantic -gstabs+ -fno-strict-aliasing -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions    -DMOZILLA_CLIENT -include ../../mozilla-config.h -Wp,-MD,.deps/TestObserverService.pp /builds/slave/sendchange-linux-unittest/mozilla/xpcom/tests/TestObserverService.cpp
/tools/gcc-4.3.3/installed/bin/g++   -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -pedantic -gstabs+ -fno-strict-aliasing -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions  -o TestObserverService TestObserverService.o   -lpthread   -Wl,-rpath-link,/builds/slave/sendchange-linux-unittest/mozilla/objdir/dist/bin -Wl,-rpath-link,/usr/local/lib  -rdynamic -L../../dist/bin -L../../dist/lib -L/builds/slave/sendchange-linux-unittest/mozilla/objdir/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl nsStaticComponents.o ../../staticlib/components/libxpctest.a ../../staticlib/components/libpref.a ../../staticlib/components/libuconv.a ../../staticlib/components/libi18n.a ../../staticlib/components/libnecko.a ../../staticlib/components/libauth.a ../../staticlib/components/libxpconnect.a ../../staticlib/components/libjsctypes.a ../../staticlib/components/libchardet.a ../../staticlib/components/libzipwriter.a ../../staticlib/components/libjar50.a ../../staticlib/components/libcookie.a ../../staticlib/components/libpermissions.a ../../staticlib/components/libstoragecomps.a ../../staticlib/components/librdf.a ../../staticlib/components/libjsd.a ../../staticlib/components/libcaps.a ../../staticlib/components/libhtmlpars.a ../../staticlib/components/libgkgfxthebes.a ../../staticlib/components/libimgicon.a ../../staticlib/components/libimglib2.a ../../staticlib/components/libwidget_gtk2.a ../../staticlib/components/libtxmgr.a ../../staticlib/components/libcomposer.a ../../staticlib/components/libgklayout.a ../../staticlib/components/libdocshell.a ../../staticlib/components/libembedcomponents.a ../../staticlib/components/libwebbrwsr.a ../../staticlib/components/libnsappshell.a ../../staticlib/components/libuniversalchardet.a ../../staticlib/components/libaccessibility.a ../../staticlib/components/libchrome.a ../../staticlib/components/libmozfind.a ../../staticlib/components/libintlapp.a ../../staticlib/components/libwindowds.a ../../staticlib/components/libappcomps.a ../../staticlib/components/libremoteservice.a ../../staticlib/components/libcommandlines.a ../../staticlib/components/libfileview.a ../../staticlib/components/libplaces.a ../../staticlib/components/libtkautocomplete.a ../../staticlib/components/libsatchel.a ../../staticlib/components/libtoolkitcomps.a ../../staticlib/components/libspellchecker.a ../../staticlib/components/libunixproxy.a ../../staticlib/components/libxpinstall.a ../../staticlib/components/libpipboot.a ../../staticlib/components/libpipnss.a ../../staticlib/components/libpippki.a ../../staticlib/components/libautoconfig.a ../../staticlib/components/libsystem-pref.a ../../staticlib/components/libmozgnome.a ../../staticlib/components/libdbusservice.a ../../staticlib/libmozreg_s.a ../../staticlib/libunicharutil_s.a ../../staticlib/libucvutil_s.a ../../staticlib/libgtkxtbin.a ../../staticlib/libmorkreader_s.a ../../staticlib/libthebes.a ../../staticlib/libgfxpsshar.a ../../staticlib/libgkgfx.a  -L../../modules/libimg/png -lmozpng -L../../jpeg -lmozjpeg -L../../modules/zlib/src -lmozz  -L../../dist/bin -L../../dist/lib -lcrmf -lsmime3 -lssl3 -lnss3 -lnssutil3  ../../gfx/cairo/cairo/src/libmozcairo.a ../../gfx/cairo/libpixman/src/libmozlibpixman.a   -lXrender -lfreetype -lfontconfig ../../gfx/qcms/libmozqcms.a  -lXt -lgthread-2.0 -L/lib -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0   -L../../dist/lib -lmozsqlite3 -lasound -lm -ldl -lpthread   -L/usr/local/lib -ljs_static  -L/lib -lgtk-x11-2.0 -latk-1.0 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0    -lX11  -ljs_static  -L/builds/slave/sendchange-linux-unittest/mozilla/objdir/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl -lm  ../../dist/lib/libxpcom_core.a  
TestPipe.cpp
/tools/gcc-4.3.3/installed/bin/g++ -o TestPipe.o -c -I../../dist/system_wrappers -include /builds/slave/sendchange-linux-unittest/mozilla/config/gcc_hidden.h -DMOZILLA_INTERNAL_API -DOSTYPE=\"Linux2.6.18-53.1.19\" -DOSARCH=Linux -D_BUILD_STATIC_BIN=1 -I/builds/slave/sendchange-linux-unittest/mozilla/xpcom/tests/../ds -I/builds/slave/sendchange-linux-unittest/mozilla/xpcom/tests/services  -I/builds/slave/sendchange-linux-unittest/mozilla/xpcom/tests -I. -I../../dist/include -I../../dist/include/nsprpub  -I/builds/slave/sendchange-linux-unittest/mozilla/objdir/dist/include/nspr -I/builds/slave/sendchange-linux-unittest/mozilla/objdir/dist/include/nss      -I../../dist/include/testing  -fPIC  -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -pedantic -gstabs+ -fno-strict-aliasing -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions    -DMOZILLA_CLIENT -include ../../mozilla-config.h -Wp,-MD,.deps/TestPipe.pp /builds/slave/sendchange-linux-unittest/mozilla/xpcom/tests/TestPipe.cpp
/tools/gcc-4.3.3/installed/bin/g++   -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -pedantic -gstabs+ -fno-strict-aliasing -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions  -o TestPipe TestPipe.o   -lpthread   -Wl,-rpath-link,/builds/slave/sendchange-linux-unittest/mozilla/objdir/dist/bin -Wl,-rpath-link,/usr/local/lib  -rdynamic -L../../dist/bin -L../../dist/lib -L/builds/slave/sendchange-linux-unittest/mozilla/objdir/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl nsStaticComponents.o ../../staticlib/components/libxpctest.a ../../staticlib/components/libpref.a ../../staticlib/components/libuconv.a ../../staticlib/components/libi18n.a ../../staticlib/components/libnecko.a ../../staticlib/components/libauth.a ../../staticlib/components/libxpconnect.a ../../staticlib/components/libjsctypes.a ../../staticlib/components/libchardet.a ../../staticlib/components/libzipwriter.a ../../staticlib/components/libjar50.a ../../staticlib/components/libcookie.a ../../staticlib/components/libpermissions.a ../../staticlib/components/libstoragecomps.a ../../staticlib/components/librdf.a ../../staticlib/components/libjsd.a ../../staticlib/components/libcaps.a ../../staticlib/components/libhtmlpars.a ../../staticlib/components/libgkgfxthebes.a ../../staticlib/components/libimgicon.a ../../staticlib/components/libimglib2.a ../../staticlib/components/libwidget_gtk2.a ../../staticlib/components/libtxmgr.a ../../staticlib/components/libcomposer.a ../../staticlib/components/libgklayout.a ../../staticlib/components/libdocshell.a ../../staticlib/components/libembedcomponents.a ../../staticlib/components/libwebbrwsr.a ../../staticlib/components/libnsappshell.a ../../staticlib/components/libuniversalchardet.a ../../staticlib/components/libaccessibility.a ../../staticlib/components/libchrome.a ../../staticlib/components/libmozfind.a ../../staticlib/components/libintlapp.a ../../staticlib/components/libwindowds.a ../../staticlib/components/libappcomps.a ../../staticlib/components/libremoteservice.a ../../staticlib/components/libcommandlines.a ../../staticlib/components/libfileview.a ../../staticlib/components/libplaces.a ../../staticlib/components/libtkautocomplete.a ../../staticlib/components/libsatchel.a ../../staticlib/components/libtoolkitcomps.a ../../staticlib/components/libspellchecker.a ../../staticlib/components/libunixproxy.a ../../staticlib/components/libxpinstall.a ../../staticlib/components/libpipboot.a ../../staticlib/components/libpipnss.a ../../staticlib/components/libpippki.a ../../staticlib/components/libautoconfig.a ../../staticlib/components/libsystem-pref.a ../../staticlib/components/libmozgnome.a ../../staticlib/components/libdbusservice.a ../../staticlib/libmozreg_s.a ../../staticlib/libunicharutil_s.a ../../staticlib/libucvutil_s.a ../../staticlib/libgtkxtbin.a ../../staticlib/libmorkreader_s.a ../../staticlib/libthebes.a ../../staticlib/libgfxpsshar.a ../../staticlib/libgkgfx.a  -L../../modules/libimg/png -lmozpng -L../../jpeg -lmozjpeg -L../../modules/zlib/src -lmozz  -L../../dist/bin -L../../dist/lib -lcrmf -lsmime3 -lssl3 -lnss3 -lnssutil3  ../../gfx/cairo/cairo/src/libmozcairo.a ../../gfx/cairo/libpixman/src/libmozlibpixman.a   -lXrender -lfreetype -lfontconfig ../../gfx/qcms/libmozqcms.a  -lXt -lgthread-2.0 -L/lib -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0   -L../../dist/lib -lmozsqlite3 -lasound -lm -ldl -lpthread   -L/usr/local/lib -ljs_static  -L/lib -lgtk-x11-2.0 -latk-1.0 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0    -lX11  -ljs_static  -L/builds/slave/sendchange-linux-unittest/mozilla/objdir/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl -lm  ../../dist/lib/libxpcom_core.a  
/usr/bin/ld: final link failed: No space left on device
collect2: ld returned 1 exit status
NEXT ERROR make[5]: *** [TestPipe] Error 1
make[5]: Leaving directory `/builds/slave/sendchange-linux-unittest/mozilla/objdir/xpcom/tests'
NEXT ERROR make[4]: *** [tools] Error 2
make[4]: Leaving directory `/builds/slave/sendchange-linux-unittest/mozilla/objdir/xpcom'
NEXT ERROR make[3]: *** [tools_tier_xpcom] Error 2
---

[1] http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTry/1262519301.1262524013.6939.gz
There are probably other bugs on this already, some of our compiled code tests have the same problem in the libxul configuration, in that they want to link to things that are not exported from libxul.
xpcshell does not build so I disabled its tests and toolkit/crashreporter/test which depends on xpcshell. All other tests pass. 

The issue now is that the Linux build and Linux tests run out of disk space on the try server.
Version: unspecified → Trunk
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
Ted, why R.Incomplete?
Is this issue fixed?
We WONTFIXed bug 525013, so I don't think this issue is worth the time to fix, but it's not necessarily WONTFIX, so I just marked it INCOMPLETE to put it to rest.

I don't think it's worth your time either, I think you'd be better served making SeaMonkey able to compile with libxul.
(In reply to comment #7)
> you'd be better served making SeaMonkey able to compile with libxul.

R.WontFix now that bug 394502 is fixed.
Resolution: INCOMPLETE → WONTFIX
(In reply to comment #8)
> (In reply to comment #7)
> > you'd be better served making SeaMonkey able to compile with libxul.
> 
> R.WontFix now that bug 394502 is fixed.

And yet not a SeaMonkey bug and c#7 said why it was INCOMPLETE...
Resolution: WONTFIX → INCOMPLETE
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.