зеркало из https://github.com/mozilla/pjs.git
327 строки
11 KiB
Plaintext
327 строки
11 KiB
Plaintext
Frequently Asked Questions ( for Build and Execution)
|
|
|
|
Build Problems
|
|
--------------
|
|
NOTE: These API tests are build using Gnu COmpiler gcc.
|
|
Always ensure that you compile Tests in same mode as Mozilla is compiled.
|
|
(Debug/Non-debug).
|
|
|
|
Solaris/Linux:
|
|
==============
|
|
|
|
1) On invoking gmake I get a message
|
|
WARNING: MOZILLA_HOME variable is incorrect !
|
|
|
|
MOZILLA_HOME dir. should point to absolute Path of mozilla dir. under
|
|
which all sources are located (e.g. /opt/mozilla).
|
|
|
|
|
|
2) On invoking gmake I get an error
|
|
/usr/ucb/cc: language optional software package not installed
|
|
make: Fatal error: Command failed for target `link'
|
|
|
|
This is because it could not find a valid GNU compiler 'gcc' in your PATH.
|
|
Update your PATH variable to point a valid location for 'gcc'
|
|
Also set the environment variable CC to gcc
|
|
(if in C-shell then, setenv CC gcc).
|
|
|
|
|
|
3) On invoking gmake I get an error, even though I have 'gcc' in my PATH.
|
|
Error message displayed is
|
|
/usr/ucb/cc: language optional software package not installed
|
|
make: Fatal error: Command failed for target `link'
|
|
|
|
|
|
Set environment variable CC to gcc
|
|
(if in C-shell then, setenv CC gcc).
|
|
|
|
|
|
4) On invoking gmake I get an error,
|
|
sh: javac: not found
|
|
|
|
This is because you do not have 'javac' in your PATH
|
|
Add ${JDKHOME}/bin into your PATH environment variable
|
|
|
|
|
|
5) On invoking gmake I get an error,
|
|
undefined versioned symbol not found. NSGetModule@@Exported
|
|
|
|
This is the famous problem of Mozilla being compiled in DEBUG mode
|
|
and OJI API tests in non-debug mode.
|
|
Ensure that both are the same (See mozilla.org build req. for setting
|
|
Debug/Non-debug mode).
|
|
|
|
|
|
Win32:
|
|
======
|
|
|
|
5) On invoking nmake I get an error
|
|
OJITestLoader.h: fatal error: Cannot open include file 'nsISupports.h'
|
|
no such file or directory
|
|
|
|
This is because MOZILLA_HOME is not set
|
|
MOZILLA_HOME dir. should point to absolute Path of mozilla dir. under
|
|
which all sources are located (e.g. /opt/mozilla).
|
|
|
|
|
|
6) On invoking nmake I get an error
|
|
LINK: fatal error LNK1181: cannot open input file nspr4.lib
|
|
|
|
This is because MOZILLA_HOME is not set
|
|
MOZILLA_HOME dir. should point to absolute Path of mozilla dir. under
|
|
which all sources are located (e.g. /opt/mozilla).
|
|
|
|
|
|
7) On invoking nmake I get an error
|
|
.... Cannot open include file prtypes.h
|
|
|
|
This usually happens if you have built MOZILLA in non-debug mode and are
|
|
trying to build the tests in debug mode.
|
|
Check you environment. You will have MOZ_DEBUG set
|
|
Unsetting it will resolve the problem
|
|
( set MOZ_DEBUG= )
|
|
|
|
|
|
8) On invoking nmake I get an error (even after I have set MOZILLA_HOME)
|
|
LINK: fatal error LNK1181: cannot open input file nspr4.lib
|
|
|
|
This usually happens if you have built MOZILLA in non-debug mode and are
|
|
trying to build the tests in debug mode.
|
|
Check you environment. You will have MOZ_DEBUG set
|
|
Unsetting it will resolve the problem
|
|
( set MOZ_DEBUG= )
|
|
|
|
|
|
9) On invoking nmake I get an error
|
|
NMAKE: fatal error ..: javac : return code...
|
|
|
|
This is because you do not have 'javac' in your PATH
|
|
Add ${JDKHOME}/bin into your PATH environment variable
|
|
|
|
|
|
===========================================================================
|
|
|
|
Execution Problems
|
|
------------------
|
|
NOTE: These API tests are build using Gnu Compiler gcc.
|
|
|
|
10) On execution autorun.pl I get errors
|
|
syntax error in file autorun.pl at line 36, next 2 tokens "use POSIX"
|
|
syntax error in file autorun.pl at line 72, next 2 tokens "cwd("
|
|
syntax error in file autorun.pl at line 94, next 2 tokens "\usage("
|
|
Execution of autorun.pl aborted due to compilation errors.
|
|
|
|
|
|
This is becuase you are using an older version of Perl
|
|
Use Perl version >= 5 and add the same to PATH environment variable
|
|
|
|
|
|
11) On execution of autorun.pl I get message
|
|
MOZILLA_FIVE_HOME is not set. Please set it and rerun this script....
|
|
|
|
The environment variable MOZILLA_FIVE_HOME is not set
|
|
It should point to absolute dir. where mozilla-bin is located
|
|
Set MOZILLA_FIVE_HOME <mozilla dir>/dist/bin
|
|
|
|
|
|
12) How can I invoke a specific test
|
|
|
|
In the script directory, there is a file OJITestsList.lst. This file
|
|
contains list of all tests. To execute any particular one use '-t'
|
|
option.
|
|
perl autorun.pl -t JNIEnv_AllocObject_2
|
|
This command will execute on this particular test.
|
|
|
|
|
|
13) On executing autorun.pl, browser always invokes "Profile Window". Is there
|
|
any way to suppress this box.
|
|
|
|
In autorun.pl, search of ADDITIONAL_PARAMETERS. It is set to "-P default"
|
|
Change it to reflect your Profile name (-P myProfile)
|
|
|
|
|
|
14) On executing autorun.pl, browser does not load the test.html.
|
|
|
|
This is because it is not able tofind test.html.
|
|
There are 2 ways of setting. One is to set environment variable TEST_URL
|
|
to point to dir. which contains test.html
|
|
(In C-Shell setenv TEST_URL <mozilla dir>/modules/oji/tests/script )
|
|
|
|
or open autorun.pl and change DEFAULT_TEST_URL to indicate your path
|
|
|
|
|
|
15) On executing autorun.pl, browser in invoked, but before test.html is loaded
|
|
it exits.
|
|
|
|
This is due to the DELAY_FACTOR set in the script.
|
|
On slower machine, you may want to increase the value of this variable.
|
|
Open autorun.pl, search for DELAY_FACTOR. change the value to a
|
|
higher number (currently it is set to 50)
|
|
|
|
16) On executin autorun.pl, it immedialtely exits. On checking the log file
|
|
it says fatal: libgkggfx.so: open failed: No such file or directory
|
|
|
|
This is because <MOZILLA_FIVE_HOME> is not set in LD_LIBRARY_PATH, and
|
|
so is not able to find the above mentioned library.
|
|
Setting it, will resolve the problem.
|
|
(setenv LD_LIBRARY_PATH <MOZILLA_FIVE_HOME>:${LD_LIBRARY_PATH})
|
|
|
|
|
|
17) On executing autorun.pl, browser in invoked, an test.html is loaded, but
|
|
it does not prompt me for a "Internet Security" Dialog box.
|
|
|
|
There can be many factors for this
|
|
* Cross-check the 'test.html'. It should have the following line
|
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
|
|
|
|
* Check <home dir>/.mozilla/default/prefs.js (on Solaris/Linux) or
|
|
c:/Program Files/Mozilla/Users50/Default/prefs.js (on Win32)
|
|
file. If it has the following entries
|
|
user_pref("capability.principal.codebase.p0.granted", "UniversalXPConnect");
|
|
user_pref("capability.principal.codebase.p0.id", "file://");
|
|
|
|
then, you have already given access permissions. Remove these entries
|
|
and try execution again.
|
|
|
|
* Check the above prefs.js if it has entry
|
|
user_pref("capability.principal.codebase.p0.denied", "UniversalXPConnect");
|
|
|
|
then you have Denied permissions to execute it. Remove that entry and
|
|
re-try execution.
|
|
|
|
|
|
18) On executin autorun.pl, it loads test.html and exits after sometime.
|
|
However the result is FAILED. On checking the log file it indicates
|
|
ld.so.1: /opt/mozilla/dist/bin/mozilla-bin: fatal: liboji.so: open
|
|
failed: No such file or directory
|
|
|
|
This is because <MOZILLA_FIVE_HOME>/components dir. is not set in
|
|
LD_LIBRARY_PATH, and so is not able to find the above mentioned library.
|
|
Setting it, will resolve the problem.
|
|
(setenv LD_LIBRARY_PATH <MOZILLA_FIVE_HOME>/components:${LD_LIBRARY_PATH})
|
|
|
|
|
|
19) Where can I find list of All Test Cases?
|
|
|
|
In 'script' dir. there is a file 'OJITestsList.lst'. This file lists
|
|
out all Test Cases.
|
|
|
|
|
|
20) Is there a list of Test Cases that have to PASS for a particular platform
|
|
|
|
In 'script' directory there is a file OJIValidTestsList.lst. This is
|
|
list of Test cases which have to PASS for a particular platform.
|
|
|
|
|
|
21) What should I do to invoke 'should PASS' Tests for a particular platform
|
|
|
|
In 'script' dir. rename 'OJITestsList.lst' to 'OJITestsList.lst.orig'.
|
|
Copy OJIValidTestsList.lst to OJITestsList.lst
|
|
And then invoke autorun.pl
|
|
|
|
|
|
22) Is Macintosh platform supported.
|
|
|
|
Currently tests are not supported for Macintosh platform.
|
|
|
|
|
|
23) What platforms are supported.
|
|
|
|
Win32 (NT/98/95/2000) and Solaris 2.7/2.8 (intel/sparc)
|
|
|
|
|
|
24) On Win32 platforms, after execution all the Tests, my "Start Menu bar"
|
|
is filled with tons of small "Duke' icons. How can I get rid of it?
|
|
|
|
This is one of the bugs in Java Plugin. After exiting browser, the Duke
|
|
icon is still displayed in the rightmost corner of Start Bar. If we move
|
|
mouse over the icon, it disappears.
|
|
|
|
To avoid this whole bunch of icons, after you invoke autorun.pl, just
|
|
place the mouse at the righmost corner on the Duke icon.
|
|
|
|
|
|
25) Where are the result files stored.
|
|
|
|
In 'script/log' directory you will find a bunch of log files.
|
|
BWTest.txt file lists out PASS/FAIL results.
|
|
BWTest.html is the above file in HTML format.
|
|
BWTestRun.log is the history of tests you ran.
|
|
|
|
|
|
26) What other options are supported by autorun.pl
|
|
|
|
Invoke perl autorun.pl -help
|
|
It will list out all options
|
|
|
|
|
|
27) After running tests, I went ahead and remove the libraries from components
|
|
directory (libojapi*.so)
|
|
Now when I invoke Mozilla, it complains of not finding those libraries.
|
|
How can I remove this dependency.
|
|
|
|
In you MOZILLA_FIVE_HOME dir. there is a file 'component.reg'.
|
|
Delete this file and invoke mozilla again.
|
|
|
|
|
|
28) All my JNI Tests seem to be failing even after I have granted permissions
|
|
to XPConnect call (thru' Internet Security Box).
|
|
|
|
All JNI tests has dependency on Java class files in 'build/classes' dir.
|
|
If the JVM cannot find theses classes, all tests will fail.
|
|
Go to <JDKHOME>/jre/bin directory. Invoke the 'ControlPanel' executable.
|
|
(On Win32 platforms click on Start->Settings->Control Panel->Duke icon)
|
|
|
|
In the Java RunTime Parameters Text Field, add the following entry
|
|
-Xbootclasspath/a:<mozilla dir>/modules/oji/tests/build/classes
|
|
|
|
where <mozilla dir> is absolute path to mozilla dir.
|
|
( e.g: -Xbootclasspath/a:c:\mozilla\modules\oji\tests\build\classes )
|
|
|
|
Press 'Apply'
|
|
Go to to your <home dir>/.java
|
|
There should be a 'properties130_01' file with the entry
|
|
javaplugin.jre.params=-Xbootclasspath/a\:c\:\\mozilla\\modules\oji\\tests\\build\\classes
|
|
Now retry, executing the Tests .
|
|
|
|
|
|
|
|
29) On Win98, when I run thru' the tests, and if Mozilla crashes, it invokes
|
|
a VC++ debug window, which stays on top. Sometimes I see a lot of
|
|
such windows. How can I ge rid of them? (I do not see the same on NT)
|
|
|
|
|
|
This is a bug we have encuntered.
|
|
In src/Killer dir. there is a file killer.cpp.win98.
|
|
DO the following.
|
|
copy killer.cpp to killer.cpp.win32
|
|
copy killer.cpp.win98 to killer.cpp
|
|
then execute command
|
|
cl killer.cpp /link user32.lib
|
|
|
|
This will generate a new killer.exe .
|
|
copy killer.exe to 'script' dir.
|
|
Now re-run the Tests. This problem should be resolved.
|
|
|
|
|
|
30) After I run a particular test, and if tests is flagged of as FAILED
|
|
how do I know what went wrong.
|
|
|
|
In 'script/log' dir. for Each Test case there is a equivalent log created
|
|
named <testcase>_<pid>.log
|
|
|
|
To find out which is the most recent log, check by time stamp
|
|
(ls -lt <testcase>_*.log )
|
|
Open the recent one, and it will tell you what went wrong
|
|
|
|
|
|
32) If I encounter any other problems while running these tests, whom can I
|
|
contact?
|
|
|
|
Send feedback to oji@eng.sun.com. Someone will get in touch with you.
|
|
|
|
|
|
|
|
|
|
===========================================================================
|