1 Frequently Asked Questions ( for Build and Execution)
5 NOTE: These API tests are build using Gnu COmpiler gcc.
6 Always ensure that you compile Tests in same mode as Mozilla is compiled.
12 1) On invoking gmake I get a message
13 WARNING: MOZILLA_HOME variable is incorrect !
15 MOZILLA_HOME dir. should point to absolute Path of mozilla dir. under
16 which all sources are located (e.g. /opt/mozilla).
19 2) On invoking gmake I get an error
20 /usr/ucb/cc: language optional software package not installed
21 make: Fatal error: Command failed for target `link'
23 This is because it could not find a valid GNU compiler 'gcc' in your PATH.
24 Update your PATH variable to point a valid location for 'gcc'
25 Also set the environment variable CC to gcc
26 (if in C-shell then, setenv CC gcc).
29 3) On invoking gmake I get an error, even though I have 'gcc' in my PATH.
30 Error message displayed is
31 /usr/ucb/cc: language optional software package not installed
32 make: Fatal error: Command failed for target `link'
35 Set environment variable CC to gcc
36 (if in C-shell then, setenv CC gcc).
39 4) On invoking gmake I get an error,
42 This is because you do not have 'javac' in your PATH
43 Add ${JDKHOME}/bin into your PATH environment variable
46 5) On invoking gmake I get an error,
47 undefined versioned symbol not found. NSGetModule@@Exported
49 This is the famous problem of Mozilla being compiled in DEBUG mode
50 and OJI API tests in non-debug mode.
51 Ensure that both are the same (See mozilla.org build req. for setting
52 Debug/Non-debug mode).
58 5) On invoking nmake I get an error
59 OJITestLoader.h: fatal error: Cannot open include file 'nsISupports.h'
60 no such file or directory
62 This is because MOZILLA_HOME is not set
63 MOZILLA_HOME dir. should point to absolute Path of mozilla dir. under
64 which all sources are located (e.g. /opt/mozilla).
67 6) On invoking nmake I get an error
68 LINK: fatal error LNK1181: cannot open input file nspr4.lib
70 This is because MOZILLA_HOME is not set
71 MOZILLA_HOME dir. should point to absolute Path of mozilla dir. under
72 which all sources are located (e.g. /opt/mozilla).
75 7) On invoking nmake I get an error
76 .... Cannot open include file prtypes.h
78 This usually happens if you have built MOZILLA in non-debug mode and are
79 trying to build the tests in debug mode.
80 Check you environment. You will have MOZ_DEBUG set
81 Unsetting it will resolve the problem
85 8) On invoking nmake I get an error (even after I have set MOZILLA_HOME)
86 LINK: fatal error LNK1181: cannot open input file nspr4.lib
88 This usually happens if you have built MOZILLA in non-debug mode and are
89 trying to build the tests in debug mode.
90 Check you environment. You will have MOZ_DEBUG set
91 Unsetting it will resolve the problem
95 9) On invoking nmake I get an error
96 NMAKE: fatal error ..: javac : return code...
98 This is because you do not have 'javac' in your PATH
99 Add ${JDKHOME}/bin into your PATH environment variable
102 ===========================================================================
106 NOTE: These API tests are build using Gnu Compiler gcc.
108 10) On execution autorun.pl I get errors
109 syntax error in file autorun.pl at line 36, next 2 tokens "use POSIX"
110 syntax error in file autorun.pl at line 72, next 2 tokens "cwd("
111 syntax error in file autorun.pl at line 94, next 2 tokens "\usage("
112 Execution of autorun.pl aborted due to compilation errors.
115 This is becuase you are using an older version of Perl
116 Use Perl version >= 5 and add the same to PATH environment variable
119 11) On execution of autorun.pl I get message
120 MOZILLA_FIVE_HOME is not set. Please set it and rerun this script....
122 The environment variable MOZILLA_FIVE_HOME is not set
123 It should point to absolute dir. where mozilla-bin is located
124 Set MOZILLA_FIVE_HOME <mozilla dir>/dist/bin
127 12) How can I invoke a specific test
129 In the script directory, there is a file OJITestsList.lst. This file
130 contains list of all tests. To execute any particular one use '-t'
132 perl autorun.pl -t JNIEnv_AllocObject_2
133 This command will execute on this particular test.
136 13) On executing autorun.pl, browser always invokes "Profile Window". Is there
137 any way to suppress this box.
139 In autorun.pl, search of ADDITIONAL_PARAMETERS. It is set to "-P default"
140 Change it to reflect your Profile name (-P myProfile)
143 14) On executing autorun.pl, browser does not load the test.html.
145 This is because it is not able tofind test.html.
146 There are 2 ways of setting. One is to set environment variable TEST_URL
147 to point to dir. which contains test.html
148 (In C-Shell setenv TEST_URL <mozilla dir>/modules/oji/tests/script )
150 or open autorun.pl and change DEFAULT_TEST_URL to indicate your path
153 15) On executing autorun.pl, browser in invoked, but before test.html is loaded
156 This is due to the DELAY_FACTOR set in the script.
157 On slower machine, you may want to increase the value of this variable.
158 Open autorun.pl, search for DELAY_FACTOR. change the value to a
159 higher number (currently it is set to 50)
161 16) On executin autorun.pl, it immedialtely exits. On checking the log file
162 it says fatal: libgkggfx.so: open failed: No such file or directory
164 This is because <MOZILLA_FIVE_HOME> is not set in LD_LIBRARY_PATH, and
165 so is not able to find the above mentioned library.
166 Setting it, will resolve the problem.
167 (setenv LD_LIBRARY_PATH <MOZILLA_FIVE_HOME>:${LD_LIBRARY_PATH})
170 17) On executing autorun.pl, browser in invoked, an test.html is loaded, but
171 it does not prompt me for a "Internet Security" Dialog box.
173 There can be many factors for this
174 * Cross-check the 'test.html'. It should have the following line
175 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
177 * Check <home dir>/.mozilla/default/prefs.js (on Solaris/Linux) or
178 c:/Program Files/Mozilla/Users50/Default/prefs.js (on Win32)
179 file. If it has the following entries
180 user_pref("capability.principal.codebase.p0.granted", "UniversalXPConnect");
181 user_pref("capability.principal.codebase.p0.id", "file://");
183 then, you have already given access permissions. Remove these entries
184 and try execution again.
186 * Check the above prefs.js if it has entry
187 user_pref("capability.principal.codebase.p0.denied", "UniversalXPConnect");
189 then you have Denied permissions to execute it. Remove that entry and
193 18) On executin autorun.pl, it loads test.html and exits after sometime.
194 However the result is FAILED. On checking the log file it indicates
195 ld.so.1: /opt/mozilla/dist/bin/mozilla-bin: fatal: liboji.so: open
196 failed: No such file or directory
198 This is because <MOZILLA_FIVE_HOME>/components dir. is not set in
199 LD_LIBRARY_PATH, and so is not able to find the above mentioned library.
200 Setting it, will resolve the problem.
201 (setenv LD_LIBRARY_PATH <MOZILLA_FIVE_HOME>/components:${LD_LIBRARY_PATH})
204 19) Where can I find list of All Test Cases?
206 In 'script' dir. there is a file 'OJITestsList.lst'. This file lists
210 20) Is there a list of Test Cases that have to PASS for a particular platform
212 In 'script' directory there is a file OJIValidTestsList.lst. This is
213 list of Test cases which have to PASS for a particular platform.
216 21) What should I do to invoke 'should PASS' Tests for a particular platform
218 In 'script' dir. rename 'OJITestsList.lst' to 'OJITestsList.lst.orig'.
219 Copy OJIValidTestsList.lst to OJITestsList.lst
220 And then invoke autorun.pl
223 22) Is Macintosh platform supported.
225 Currently tests are not supported for Macintosh platform.
228 23) What platforms are supported.
230 Win32 (NT/98/95/2000) and Solaris 2.7/2.8 (intel/sparc)
233 24) On Win32 platforms, after execution all the Tests, my "Start Menu bar"
234 is filled with tons of small "Duke' icons. How can I get rid of it?
236 This is one of the bugs in Java Plugin. After exiting browser, the Duke
237 icon is still displayed in the rightmost corner of Start Bar. If we move
238 mouse over the icon, it disappears.
240 To avoid this whole bunch of icons, after you invoke autorun.pl, just
241 place the mouse at the righmost corner on the Duke icon.
244 25) Where are the result files stored.
246 In 'script/log' directory you will find a bunch of log files.
247 BWTest.txt file lists out PASS/FAIL results.
248 BWTest.html is the above file in HTML format.
249 BWTestRun.log is the history of tests you ran.
252 26) What other options are supported by autorun.pl
254 Invoke perl autorun.pl -help
255 It will list out all options
258 27) After running tests, I went ahead and remove the libraries from components
259 directory (libojapi*.so)
260 Now when I invoke Mozilla, it complains of not finding those libraries.
261 How can I remove this dependency.
263 In you MOZILLA_FIVE_HOME dir. there is a file 'component.reg'.
264 Delete this file and invoke mozilla again.
267 28) All my JNI Tests seem to be failing even after I have granted permissions
268 to XPConnect call (thru' Internet Security Box).
270 All JNI tests has dependency on Java class files in 'build/classes' dir.
271 If the JVM cannot find theses classes, all tests will fail.
272 Go to <JDKHOME>/jre/bin directory. Invoke the 'ControlPanel' executable.
273 (On Win32 platforms click on Start->Settings->Control Panel->Duke icon)
275 In the Java RunTime Parameters Text Field, add the following entry
276 -Xbootclasspath/a:<mozilla dir>/modules/oji/tests/build/classes
278 where <mozilla dir> is absolute path to mozilla dir.
279 ( e.g: -Xbootclasspath/a:c:\mozilla\modules\oji\tests\build\classes )
282 Go to to your <home dir>/.java
283 There should be a 'properties130_01' file with the entry
284 javaplugin.jre.params=-Xbootclasspath/a\:c\:\\mozilla\\modules\oji\\tests\\build\\classes
285 Now retry, executing the Tests .
289 29) On Win98, when I run thru' the tests, and if Mozilla crashes, it invokes
290 a VC++ debug window, which stays on top. Sometimes I see a lot of
291 such windows. How can I ge rid of them? (I do not see the same on NT)
294 This is a bug we have encuntered.
295 In src/Killer dir. there is a file killer.cpp.win98.
297 copy killer.cpp to killer.cpp.win32
298 copy killer.cpp.win98 to killer.cpp
300 cl killer.cpp /link user32.lib
302 This will generate a new killer.exe .
303 copy killer.exe to 'script' dir.
304 Now re-run the Tests. This problem should be resolved.
307 30) After I run a particular test, and if tests is flagged of as FAILED
308 how do I know what went wrong.
310 In 'script/log' dir. for Each Test case there is a equivalent log created
311 named <testcase>_<pid>.log
313 To find out which is the most recent log, check by time stamp
314 (ls -lt <testcase>_*.log )
315 Open the recent one, and it will tell you what went wrong
318 32) If I encounter any other problems while running these tests, whom can I
321 Send feedback to oji@eng.sun.com. Someone will get in touch with you.
326 ===========================================================================