Closed Bug 350886 Opened 14 years ago Closed 13 years ago
XPCOM Unit Test
This is an attempt at a browser based JavaXPCOM unit test. This patch creates a Java component (using Java Component Loader code from bug 299263). The tests are run by loading the web page and clicking on the 'Run' button.
Attachment #236251 - Attachment is obsolete: true
This patch rearranges how JavaXPCOM is built. Currently, the main make call to JavaXPCOM happens in tier_toolkit. This results in building the JNI code (which gets linked in to libXUL) and the glue code. Later, there is a special call to extensions/java/xpcom/interfaces in tier_app (for XULRunner) to build MozillaInterfaces.jar. This setup isn't very good since it requires special rules in order to build any other Java code that depends on MozillaInterfaces.jar. This patch moves the main make call to JavaXPCOM to the tier_app XULRunner group. Since this is the last tier, MozillaInterfaces.jar can be built during the 'libs' stage in order to pick up all of the interfaces. Then any Java code depending on MozillaInterfaces.jar is built during the same 'libs' stage. The only special case that needs to be handled is the JNI code. Since it is linked into libXUL, it needs to be built before the call to build libXUL. So there is a line in tier_toolkit to make in extensions/java/xpcom/src. Benjamin, can you review the Makefile changes?
Properly handle "install" make target.
Comment on attachment 254381 [details] [diff] [review] patch v2.2 - make check >Index: extensions/java/xpcom/Makefile.in >+# Build the implementation Java classes >+libs:: >+ make -C src jar-libs >+install:: >+ make -C src jar-install Please add a line of whitespace between rules.
Attachment #254381 - Flags: review?(benjamin) → review+
Since I am making a change to nsIXPCTestIn interface (fixing a method declaration), do I need to change the IID?
In general, yes.
Checked in to trunk. -> FIXED
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
This is the 1.8.1 branch version of the makefile reorg changes from the trunk patch. XULRunner only.
Attachment #257077 - Flags: approval18.104.22.168?
This caused a build failure on the FF+XR tinderbox (the only one with --enable-tests): d:/builds/tinderbox/Fx-XR/WINNT_5.2_Depend/mozilla/extensions/java/xpcom/tests/testparams/TestParams.java:64: warning: unmappable character for encoding Cp1252 "Non-Ascii 1 byte chars: Ž‰ŠˆŒ?, 2 byte chars: \u1234 \u1235 \u1236"; See http://tinderbox.mozilla.org/showlog.cgi?log=MozillaExperimental/1173081480.1173084330.23199.gz&fulltext=1
Actually, there error is that it cannot find LocationProvider.java. Seems that this bit of the command is failing: -sourcepath ".;/cygdrive/d/builds/tinderbox/Fx-XR/WINNT_5.2_Depend/mozilla/extensions/java/xpcom/tests/testparams;/cygdrive/d/builds/tinderbox/Fx-XR/WINNT_5.2_Depend/mozilla/extensions/java/xpcom/tests/testparams/.." I know that 'javac' is sensitive to windows build paths. The command is called using 'cygwin-wrapper', so I assume that is replacing the 'cygdrive' instances. Plus, why is this failing for this build, but not for the standalone XULRunner? I don't have cygwin installed any more, but I did try to reproduce using Benjamin's new Windows tools (MSYS). This build failed in mozilla/extensions/java/xpcom/interfaces, for what seems to be a similar issue. The '-sourcepath' flag arguments have MSYS style paths (i.e. "/e/builds/trunk/..."). When I manually edited this to start with "e:/builds/...", then 'javac' completed just fine. Really not sure what is going on.
(In reply to comment #12) > Actually, there error is that it cannot find LocationProvider.java. Seems that > this bit of the command is failing: > > -sourcepath > ".;/cygdrive/d/builds/tinderbox/Fx-XR/WINNT_5.2_Depend/mozilla/extensions/java/xpcom/tests/testparams;/cygdrive/d/builds/tinderbox/Fx-XR/WINNT_5.2_Depend/mozilla/extensions/java/xpcom/tests/testparams/.." The problem is that both the cygwin wrapper and the msys magic /c/path know how to convert standalone arguments, but they don't know how to convert an argument with semicolons. > Plus, why is this failing for this build, but not for the standalone > XULRunner? The main build has --disable-tests
Moving Cygwin/MSYS build break discussion to already existing bug 363485.
Comment on attachment 257077 [details] [diff] [review] 1.8.1 patch - makefile changes approved for 22.214.171.124, a=dveditz for release-drivers
Attachment #257077 - Flags: approval126.96.36.199? → approval188.8.131.52+
Makefile changes checked in to MOZILLA_1_8_BRANCH.
Comment on attachment 257077 [details] [diff] [review] 1.8.1 patch - makefile changes >+jar-install:: $(JARFILE) >+ $(SYSINSTALL) $(IFLAGS2) $(JARFILE) $(DESTDIR)$(mozappdir) This should be IFLAGS1, not IFLAGS2.
You need to log in before you can comment on or make changes to this bug.