зеркало из https://github.com/mozilla/gecko-dev.git
r=a=edburns
Updates build/Makefile.win (create dir. bin/classes) build/Makefile (create dir. bin/classes) build/compile.mk (DEBUG support) build/rules.mk (Changed order of LIBS and add MOZ_DEBUG flag) build/test.html (updated test.html) build/README (updated README) src/JNI/Makefile (Changed JAR action) src/JNI/Makefile.win (Changed JAR action) src/include/ojiapitests.h (Resolve bug 52340) src/JNI/ClassOperation/Makefile (Add FindClass_8 Test) New files README (Updated README) FAQ (Frequently asked questions) script/test.html (Default test.html to be loaded for all test cases) script/OJIValidTests.lst (List of Tests Cases that have to PASS) src/Killer/kill.bat (compilation script for killer.exe) src/Killer/killer.cpp.win98 (for killing VC++ debug window for win98)
This commit is contained in:
Родитель
fa47af5c3b
Коммит
6af25acfae
|
@ -0,0 +1,326 @@
|
|||
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 enviroment 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 supress 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 follwing 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 follwing 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.
|
||||
|
||||
|
||||
|
||||
|
||||
===========================================================================
|
|
@ -0,0 +1,168 @@
|
|||
This README file indicates steps required for Building and Execution of OJI API tests
|
||||
|
||||
How the Tests Work
|
||||
------------------
|
||||
These OJI API Tests basically 4 areas via:
|
||||
Java Native Interface (JNI)
|
||||
JVM Manager Tests (JM)
|
||||
Thread Manager Tests (TM)
|
||||
LiveConnect Manager Tests (LCM)
|
||||
|
||||
On Building the Test Base ( from build directory) 5 shared libraries are
|
||||
created which are copied over to the bin/components dir.
|
||||
( libojiapijmtests.so,libojiapilcmtests.so, libojiapitmtests.so,
|
||||
libojiapijnitests.so, libojiapitl.so )
|
||||
|
||||
On Invoking the browser, it registers all these libraries and then invokes
|
||||
the page test.html (in script dir.)
|
||||
|
||||
It first prompts a dialog box for Permissions to invoke a XPConnect call.
|
||||
The user has to grant permissions to execute the tests.
|
||||
(NOTE: If user denys, then the tests cannot be invoked)
|
||||
|
||||
Once permissions are granted, it will follow these steps
|
||||
* Create a TestLoader instance.
|
||||
* Read List of Tests from file OJITestsList.lst (in script dir.)
|
||||
* For each test entry in that file, determine type of Test (JNI/JM/LCM/TM)
|
||||
* Load appropriate library if not already loaded
|
||||
* Find method address from the loaded library
|
||||
* Invoke method to be tested with appropriate test parameters
|
||||
* Record results in log file
|
||||
|
||||
Below are instructions on how to build and execute.
|
||||
Also check FAQ for answers to known problems encountered.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Instructions (Build/Execution)
|
||||
==============================
|
||||
|
||||
Win32
|
||||
-----
|
||||
|
||||
============-=============
|
||||
I. Build OJI API test:
|
||||
==========================
|
||||
|
||||
Pre-Requisite: You must have built mozilla browser and
|
||||
have Perl (version >= 5) installed.
|
||||
|
||||
1. set MOZILLA_HOME (top of Mozilla's tree) and JAVAHOME variables
|
||||
2. set MOZILLA_FIVE_HOME to <MOZILLA_HOME>/dist/win32_O.obj/bin directory
|
||||
where mozilla.exe is located
|
||||
3. goto build directory and say
|
||||
nmake -f Makefile.win
|
||||
|
||||
Libraries created are located in 'build/bin' dir. and
|
||||
MOZILLA_FIVE_HOME/components directory.
|
||||
|
||||
=============================
|
||||
II.Execute OJI API tests:
|
||||
=============================
|
||||
|
||||
Pre-Requisite: Have Perl (version >= 5) installed and
|
||||
Java1.3.0_01 SDK installed.
|
||||
|
||||
1. Update <homedir>/Program Files/Users50/<profile dir>/prefs.js to add line
|
||||
user_pref("signed.applets.codebase_principal_support",true);
|
||||
where <profile dir> is your profile name
|
||||
2. Update Path variable to include
|
||||
$MOZILLA_HOME/dist/win32_O.obj/bin and
|
||||
$MOZILLA_HOME/dist/win32_O.obj/bin/components
|
||||
3. Set TEST_URL to point to url location of test.html.
|
||||
(file://<mozilla dir>/modules/oji/tests/script)
|
||||
4. Delete component.reg file in Mozilla's bin directory.
|
||||
5. Click on Start-Settings-Control Panel->Duke icon.
|
||||
This will invoke the Java Plugin Control Panel
|
||||
6. In Runtime Parameter Text Field add the following line
|
||||
-Xbootclasspath/a:<class dir>
|
||||
where <class dir> is <MOZILLA_HOME>\modules\oji\tests\build\classes
|
||||
7. Create .java.policy file in you home directory and add this line
|
||||
grant {
|
||||
permission java.security.AllPermission;
|
||||
}
|
||||
8. Change DELAY_FACTOR in script/autorun.pl to some higher value, if mozilla
|
||||
takes more time to load. It should be a value greater than 0.
|
||||
9 Change script/autorun.pl and change ADDITIONAL_PARAMETERS to reflect your
|
||||
profile
|
||||
10. Goto script dir. and run perl script
|
||||
perl autorun.pl
|
||||
11. It will invoke the browser and load 'test.html'.
|
||||
12. It should prompt a "Internet Security" Dialog box prompting for Permissions
|
||||
Check "Remember the decision" checkbox.
|
||||
Click on 'Yes' (NOTE: clicking on 'No' will not invoke any of the Tests).
|
||||
|
||||
All done
|
||||
See results of execution in the script/log directory.
|
||||
Output HTML file is script/log/BWTest.html
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
Solaris/Linux
|
||||
--------------
|
||||
|
||||
==========================
|
||||
I. Build OJI API test:
|
||||
==========================
|
||||
|
||||
Pre-Requisite: You must have built mozilla browser and have
|
||||
have Perl (version >= 5) installed.
|
||||
|
||||
1. set MOZILLA_HOME (top of Mozilla's tree) and JAVAHOME variables
|
||||
2. set MOZILLA_FIVE_HOME to <MOZILLA_HOME>/dist/bin
|
||||
where mozilla-bin is located
|
||||
3. set CC to point to gcc
|
||||
setenv CC gcc
|
||||
4. goto build directory and say
|
||||
gmake
|
||||
|
||||
Libraries created are located in 'build/bin' dir. and
|
||||
MOZILLA_FIVE_HOME/components directory.
|
||||
|
||||
=============================
|
||||
II. Execute OJI API tests:
|
||||
=============================
|
||||
|
||||
Pre-Requisite: Have Perl installed and Java2 SDK installed.
|
||||
|
||||
1. Update <home dir>/.mozilla/<profile dir>/prefs.js to add line
|
||||
user_pref("signed.applets.codebase_principal_support",true);
|
||||
where <profile dir> is your profile name
|
||||
2. Update LD_LIBRARY_PATH variable to include
|
||||
$MOZILLA_HOME/dist/bin and
|
||||
$MOZILLA_HOME/dist/bin/components
|
||||
3. Set TEST_URL to point to url location of test.html.
|
||||
(file://<mozilla dir>/modules/oji/tests/script)
|
||||
4. Delete component.reg file in Mozilla's bin directory.
|
||||
5. Invoke <Java2 SDK dir.>/jre/bin/ControlPanel
|
||||
6. In RunTime Parameter Text Field add the following line
|
||||
-Xbootclasspath/a:<class dir>
|
||||
where <class dir> is <MOZILLA_HOME>/modules/oji/tests/build/classes
|
||||
|
||||
7. Create .java.policy file in you home directory and add the lines
|
||||
grant {
|
||||
permission java.security.AllPermission;
|
||||
}
|
||||
8. Change DELAY_FACTOR in script/autorun.pl to some higher value, if mozilla
|
||||
takes more time to load. It should be a value greater than 0.
|
||||
9 Change script/autorun.pl and change ADDITIONAL_PARAMETERS to reflect your
|
||||
profile (by default it uses default).
|
||||
10. Goto script dir. and run perl script
|
||||
perl autorun.pl
|
||||
11. It will invoke the browser and load 'test.html'.
|
||||
12. It should prompt a "Internet Security" Dialog box prompting for Permissions
|
||||
Check "Remember the decision" checkbox.
|
||||
Click on 'Yes' (NOTE: clicking on 'No' will not invoke any of the Tests).
|
||||
|
||||
|
||||
All done
|
||||
See results of execution in the script/log directory.
|
||||
Output HTML file is script/log/BWTest.html
|
||||
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
Mac
|
||||
---
|
||||
|
||||
Currently does not work with Mac.
|
|
@ -26,18 +26,21 @@ DIRS= \
|
|||
|
||||
TOP_DIR = ..
|
||||
|
||||
all: check_env $(DIRS)
|
||||
all: createdir check_env $(DIRS)
|
||||
|
||||
$(DIRS)::
|
||||
@echo "############## Building $@ ####################"
|
||||
@cd $(TOP_DIR)/src/$@; \
|
||||
if test ! -f depend.mak; then >depend.mak; fi; \
|
||||
make make_depends; \
|
||||
make all;
|
||||
$(MAKE) make_depends; \
|
||||
$(MAKE) all;
|
||||
|
||||
check_env:
|
||||
@if test ! -d $(MOZILLA_HOME)/dist/include; then echo "WARNING: MOZILLA_HOME variable is incorrect !"; exit 1; fi
|
||||
|
||||
createdir:
|
||||
@mkdir -p bin
|
||||
@mkdir -p classes
|
||||
|
||||
clean:
|
||||
@for d in $(DIRS); do \
|
||||
|
|
|
@ -28,6 +28,12 @@ TOP_DIR = ..
|
|||
|
||||
|
||||
all:
|
||||
!if !exist(bin)
|
||||
@mkdir bin
|
||||
!endif
|
||||
!if !exist(classes)
|
||||
@mkdir classes
|
||||
!endif
|
||||
@set MAKE_TARGET=make_depends
|
||||
@nmake -nologo -f Makefile.win $(DIRS)
|
||||
@set MAKE_TARGET=all
|
||||
|
|
|
@ -1,138 +1,168 @@
|
|||
======================
|
||||
I. To build OJI API test:
|
||||
======================
|
||||
This README file indicates steps required for Building and Execution of OJI API tests
|
||||
|
||||
How the Tests Work
|
||||
------------------
|
||||
These OJI API Tests basically 4 areas via:
|
||||
Java Native Interface (JNI)
|
||||
JVM Manager Tests (JM)
|
||||
Thread Manager Tests (TM)
|
||||
LiveConnect Manager Tests (LCM)
|
||||
|
||||
On Building the Test Base ( from build directory) 5 shared libraries are
|
||||
created which are copied over to the bin/components dir.
|
||||
( libojiapijmtests.so,libojiapilcmtests.so, libojiapitmtests.so,
|
||||
libojiapijnitests.so, libojiapitl.so )
|
||||
|
||||
On Invoking the browser, it registers all these libraries and then invokes
|
||||
the page test.html (in script dir.)
|
||||
|
||||
It first prompts a dialog box for Permissions to invoke a XPConnect call.
|
||||
The user has to grant permissions to execute the tests.
|
||||
(NOTE: If user denys, then the tests cannot be invoked)
|
||||
|
||||
Once permissions are granted, it will follow these steps
|
||||
* Create a TestLoader instance.
|
||||
* Read List of Tests from file OJITestsList.lst (in script dir.)
|
||||
* For each test entry in that file, determine type of Test (JNI/JM/LCM/TM)
|
||||
* Load appropriate library if not already loaded
|
||||
* Find method address from the loaded library
|
||||
* Invoke method to be tested with appropriate test parameters
|
||||
* Record results in log file
|
||||
|
||||
Below are instructions on how to build and execute.
|
||||
Also check FAQ for answers to known problems encountered.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Instructions (Build/Execution)
|
||||
==============================
|
||||
|
||||
Win32
|
||||
-----
|
||||
|
||||
============-=============
|
||||
I. Build OJI API test:
|
||||
==========================
|
||||
|
||||
Pre-Requisite: You must have built mozilla browser and
|
||||
have Perl (version >= 5) installed.
|
||||
|
||||
1. set MOZILLA_HOME (top of Mozilla's tree) and JAVAHOME variables
|
||||
2. goto build directory and say
|
||||
2. set MOZILLA_FIVE_HOME to <MOZILLA_HOME>/dist/win32_O.obj/bin directory
|
||||
where mozilla.exe is located
|
||||
3. goto build directory and say
|
||||
nmake -f Makefile.win
|
||||
|
||||
=====================
|
||||
II. To run OJI API tests:
|
||||
=====================
|
||||
Libraries created are located in 'build/bin' dir. and
|
||||
MOZILLA_FIVE_HOME/components directory.
|
||||
|
||||
1. Copy all *.dll files from build/bin directory to Mozilla's bin
|
||||
directory
|
||||
2. Add the following string into your morProfile/prefs.js file
|
||||
user_pref("security.checkxpconnect", false);
|
||||
5. Update Path variable to include
|
||||
$MOZILLA_HOME/dist/win32_d.obj/bin and
|
||||
$MOZILLA_HOME/dist/win32_d.obj/bin/components
|
||||
6. In Mozilla's bin directory say
|
||||
regxpcom.exe ojiapitl.dll
|
||||
If this step fails for some reason see section III(1).
|
||||
=============================
|
||||
II.Execute OJI API tests:
|
||||
=============================
|
||||
|
||||
A. Quick mode (all test cases in one Mozilla session):
|
||||
-------------------------------------------------
|
||||
7. Copy OJITest.lst from build directory to Mozilla's
|
||||
bin directory
|
||||
8. in Mozilla's bin directory say
|
||||
viewer file:/test.html
|
||||
9. Click "Start" button in the loaded document
|
||||
Pre-Requisite: Have Perl (version >= 5) installed and
|
||||
Java1.3.0_01 SDK installed.
|
||||
|
||||
|
||||
B. Slow mode (new Mozilla session for each test case):
|
||||
------------------------------------------------------
|
||||
7. Goto script directory and set correct parameters in the first few
|
||||
lines of autorun.pl file.
|
||||
8. Run perl script
|
||||
1. Update <homedir>/Program Files/Users50/<profile dir>/prefs.js to add line
|
||||
user_pref("signed.applets.codebase_principal_support",true);
|
||||
where <profile dir> is your profile name
|
||||
2. Update Path variable to include
|
||||
$MOZILLA_HOME/dist/win32_O.obj/bin and
|
||||
$MOZILLA_HOME/dist/win32_O.obj/bin/components
|
||||
3. Set TEST_URL to point to url location of test.html.
|
||||
(file://<mozilla dir>/modules/oji/tests/script)
|
||||
4. Delete component.reg file in Mozilla's bin directory.
|
||||
5. Click on Start-Settings-Control Panel->Duke icon.
|
||||
This will invoke the Java Plugin Control Panel
|
||||
6. In Runtime Parameter Text Field add the following line
|
||||
-Xbootclasspath/a:<class dir>
|
||||
where <class dir> is <MOZILLA_HOME>\modules\oji\tests\build\classes
|
||||
7. Create .java.policy file in you home directory and add this line
|
||||
grant {
|
||||
permission java.security.AllPermission;
|
||||
}
|
||||
8. Change DELAY_FACTOR in script/autorun.pl to some higher value, if mozilla
|
||||
takes more time to load. It should be a value greater than 0.
|
||||
9 Change script/autorun.pl and change ADDITIONAL_PARAMETERS to reflect your
|
||||
profile
|
||||
10. Goto script dir. and run perl script
|
||||
perl autorun.pl
|
||||
9 See results of execution in the log directory.
|
||||
11. It will invoke the browser and load 'test.html'.
|
||||
12. It should prompt a "Internet Security" Dialog box prompting for Permissions
|
||||
Check "Remember the decision" checkbox.
|
||||
Click on 'Yes' (NOTE: clicking on 'No' will not invoke any of the Tests).
|
||||
|
||||
All done
|
||||
See results of execution in the script/log directory.
|
||||
Output HTML file is script/log/BWTest.html
|
||||
|
||||
|
||||
Note: If you plan to run JNIEnv tests add classes/test.jar (or simply classes
|
||||
directory) into your CLASSPATH. Also you may need to add this path
|
||||
into your Java Policy file with java.security.AllPermission permission
|
||||
(otherwise it's impossible to load native libraries from these classes).
|
||||
|
||||
|
||||
====================
|
||||
III. Known problems:
|
||||
====================
|
||||
1. In the last version of Mozilla regxpcom fails to registry
|
||||
anything. So do the following:
|
||||
a. Put all dll's into Mozilla's bin/components (instead of bin directory) directory
|
||||
b. Delete component.reg file in Mozilla's bin directory
|
||||
|
||||
2. Buildin OJI tests fails because linker can't find destructor of
|
||||
nsCOMPtr_base class (~nsCOMPtr_base). I had no time to evalute
|
||||
this problem - so simply comment the followin line in the
|
||||
dist/include/nsCOMPtr.h file:
|
||||
#define NSCAP_FEATURE_FACTOR_DESTRUCTOR
|
||||
|
||||
3. While running tests in the 'slow' mode (using autorun.pl) no logs
|
||||
from STDOUT and STDERR are stored in log files if MOZILLA_EXCUTABLE
|
||||
is set to viewer.exe.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
Solaris
|
||||
--------
|
||||
Solaris/Linux
|
||||
--------------
|
||||
|
||||
==========================
|
||||
I. To build OJI API test:
|
||||
I. Build OJI API test:
|
||||
==========================
|
||||
|
||||
Pre-Requisite: You must have built mozilla browser and have
|
||||
have Perl (version >= 5) installed.
|
||||
|
||||
1. set MOZILLA_HOME (top of Mozilla's tree) and JAVAHOME variables
|
||||
2. goto build directory and say
|
||||
2. set MOZILLA_FIVE_HOME to <MOZILLA_HOME>/dist/bin
|
||||
where mozilla-bin is located
|
||||
3. set CC to point to gcc
|
||||
setenv CC gcc
|
||||
4. goto build directory and say
|
||||
gmake
|
||||
|
||||
==========================
|
||||
II. To run OJI API tests:
|
||||
==========================
|
||||
Libraries created are located in 'build/bin' dir. and
|
||||
MOZILLA_FIVE_HOME/components directory.
|
||||
|
||||
1. Copy all *.so files from build/bin directory to Mozilla's bin
|
||||
directory
|
||||
2. Copy test.html,loader.html to a location on your WebServer.
|
||||
Change test.html to reflect correct URL path.
|
||||
3. set environment variable TEST_URL to point to URL path where
|
||||
test.html is located.
|
||||
4. Add the following string into your mozProfile/prefs.js file
|
||||
user_pref("security.checkxpconnect", false);
|
||||
5. Update Path variable to include
|
||||
$MOZILLA_HOME/dist/win32_d.obj/bin and
|
||||
$MOZILLA_HOME/dist/win32_d.obj/bin/components
|
||||
6. In Mozilla's bin directory say
|
||||
regxpcom libojiapitl.so
|
||||
If this step fails for some reason see section III(1).
|
||||
=============================
|
||||
II. Execute OJI API tests:
|
||||
=============================
|
||||
|
||||
A. Quick mode (all test cases in one Mozilla session):
|
||||
------------------------------------------------------
|
||||
7. Copy OJITest.lst from build directory to Mozilla's
|
||||
bin directory
|
||||
8. in Mozilla's bin directory say
|
||||
viewer file:/test.html
|
||||
9. Click "Start" button in the loaded document
|
||||
Pre-Requisite: Have Perl installed and Java2 SDK installed.
|
||||
|
||||
1. Update <home dir>/.mozilla/<profile dir>/prefs.js to add line
|
||||
user_pref("signed.applets.codebase_principal_support",true);
|
||||
where <profile dir> is your profile name
|
||||
2. Update LD_LIBRARY_PATH variable to include
|
||||
$MOZILLA_HOME/dist/bin and
|
||||
$MOZILLA_HOME/dist/bin/components
|
||||
3. Set TEST_URL to point to url location of test.html.
|
||||
(file://<mozilla dir>/modules/oji/tests/script)
|
||||
4. Delete component.reg file in Mozilla's bin directory.
|
||||
5. Invoke <Java2 SDK dir.>/jre/bin/ControlPanel
|
||||
6. In RunTime Parameter Text Field add the following line
|
||||
-Xbootclasspath/a:<class dir>
|
||||
where <class dir> is <MOZILLA_HOME>/modules/oji/tests/build/classes
|
||||
|
||||
B. Slow mode (new Mozilla session for each test case):
|
||||
--------------------------------------------------------------------
|
||||
7. Goto script directory and set correct parameters in the first few
|
||||
lines of autorun.pl file.
|
||||
MOZILLA_EXECUTABLE -> Mozilla binary name
|
||||
ADDITIONAL_PARAMETERS -> Enter Profile you want to use
|
||||
|
||||
8. Run perl script
|
||||
7. Create .java.policy file in you home directory and add the lines
|
||||
grant {
|
||||
permission java.security.AllPermission;
|
||||
}
|
||||
8. Change DELAY_FACTOR in script/autorun.pl to some higher value, if mozilla
|
||||
takes more time to load. It should be a value greater than 0.
|
||||
9 Change script/autorun.pl and change ADDITIONAL_PARAMETERS to reflect your
|
||||
profile (by default it uses default).
|
||||
10. Goto script dir. and run perl script
|
||||
perl autorun.pl
|
||||
9 See results of execution in the log directory.
|
||||
11. It will invoke the browser and load 'test.html'.
|
||||
12. It should prompt a "Internet Security" Dialog box prompting for Permissions
|
||||
Check "Remember the decision" checkbox.
|
||||
Click on 'Yes' (NOTE: clicking on 'No' will not invoke any of the Tests).
|
||||
|
||||
|
||||
Note: If you plan to run JNIEnv tests add classes/test.jar into your CLASSPATH
|
||||
All done
|
||||
See results of execution in the script/log directory.
|
||||
Output HTML file is script/log/BWTest.html
|
||||
|
||||
|
||||
====================
|
||||
III. Known problems:
|
||||
====================
|
||||
1. In the last version of Mozilla regxpcom fails to registry
|
||||
anything. So do the following:
|
||||
a. Put all .so libraries into Mozilla's bin/components (instead of bin directory) directory
|
||||
b. Delete component.reg file in Mozilla's bin directory
|
||||
|
||||
2. Buildin OJI tests fails because linker can't find destructor of
|
||||
nsCOMPtr_base class (~nsCOMPtr_base). I had no time to evalute
|
||||
this problem - so simply comment the followin line in the
|
||||
dist/include/nsCOMPtr.h file:
|
||||
#define NSCAP_FEATURE_FACTOR_DESTRUCTOR
|
||||
|
||||
3. While running tests in the 'slow' mode (using autorun.pl) no logs
|
||||
from STDOUT and STDERR are stored in log files if MOZILLA_EXCUTABLE
|
||||
is set to viewer.
|
||||
--------------------------------------------------------------------------
|
||||
Mac
|
||||
---
|
||||
|
||||
Currently does not work with Mac.
|
||||
|
|
|
@ -26,6 +26,9 @@ INCLUDES += -I. \
|
|||
-I$(MOZILLA_HOME)/dist/include
|
||||
|
||||
DEFINES=-DXP_UNIX
|
||||
ifeq ($(MOZ_DEBUG),1)
|
||||
DEFINES+=-DDEBUG
|
||||
endif
|
||||
|
||||
CC_OBJ=$(CC) $(C_FLAGS) $(DEFINES) $(INCLUDES)
|
||||
|
||||
|
|
|
@ -47,18 +47,22 @@ del_cmd:
|
|||
rm cmd.mak; \
|
||||
fi
|
||||
|
||||
ifndef MOZ_DEBUG
|
||||
include $(MOZILLA_HOME)/config/autoconf.mk
|
||||
endif
|
||||
|
||||
compile: objdir del_cmd $(OBJS)
|
||||
@-mv *.o $(OBJ_DIR) 2> /dev/null
|
||||
@$(MAKE_MAK) cmd.mak CC_OBJ $(TOP_DIR) $(OBJ_DIR) $(INCLUDES)
|
||||
@make -f cmd.mak all
|
||||
@export MOZ_DEBUG; MOZ_DEBUG=$(MOZ_DEBUG); $(MAKE) -f cmd.mak all
|
||||
@-mv *.o $(OBJ_DIR) 2> /dev/null
|
||||
|
||||
|
||||
link:
|
||||
@if test 'x$(USE_SUN_WS)' = 'x1'; then \
|
||||
$(CC) $(LD_FLAGS_WS) $(LIBS) $(OBJS) $(LD_PATH) -o $(OBJ_DIR)/lib$(DLL).so; \
|
||||
$(CC) $(LD_FLAGS_WS) $(OBJS) $(LD_PATH) $(LIBS) -o $(OBJ_DIR)/lib$(DLL).so; \
|
||||
else \
|
||||
$(CC) $(LD_FLAGS_GCC) $(LIBS) $(OBJS) $(LD_PATH) -o $(OBJ_DIR)/lib$(DLL).so; \
|
||||
$(CC) $(LD_FLAGS_GCC) $(OBJS) $(LD_PATH) $(LIBS) -o $(OBJ_DIR)/lib$(DLL).so; \
|
||||
fi;
|
||||
@cp obj/lib$(DLL).so $(TOP_DIR)/build/bin/.
|
||||
@cp obj/lib$(DLL).so $(TOP_DIR)/../../../dist/bin/components/.
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
<head>
|
||||
<script>
|
||||
function startOJITests() {
|
||||
var OJITestLoader = Components.classes["@mozilla.org/oji/test/api/loader;1"].createInstance();
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
// var OJITestLoader = Components.classes["component://netscape/oji/test/api/loader"].createInstance();
|
||||
var OJITestLoader = Components.classes['@mozilla.org/oji/test/api/loader;1'].createInstance();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -0,0 +1,558 @@
|
|||
#
|
||||
####################### Proxy JNI tests #######################
|
||||
#
|
||||
JNIEnv_AllocObject_2
|
||||
JNIEnv_AllocObject_3
|
||||
JNIEnv_AllocObject_4
|
||||
JNIEnv_CallBooleanMethod_1
|
||||
JNIEnv_CallBooleanMethod_2
|
||||
JNIEnv_CallBooleanMethod_3
|
||||
JNIEnv_CallBooleanMethod_4
|
||||
JNIEnv_CallByteMethod_1
|
||||
JNIEnv_CallByteMethod_2
|
||||
JNIEnv_CallByteMethod_3
|
||||
JNIEnv_CallByteMethod_4
|
||||
JNIEnv_CallCharMethod_1
|
||||
JNIEnv_CallCharMethod_2
|
||||
JNIEnv_CallDoubleMethod_1
|
||||
JNIEnv_CallDoubleMethod_2
|
||||
JNIEnv_CallDoubleMethod_3
|
||||
JNIEnv_CallDoubleMethod_4
|
||||
JNIEnv_CallFloatMethod_1
|
||||
JNIEnv_CallFloatMethod_2
|
||||
JNIEnv_CallFloatMethod_3
|
||||
JNIEnv_CallFloatMethod_4
|
||||
JNIEnv_CallIntMethod_10
|
||||
JNIEnv_CallIntMethod_11
|
||||
JNIEnv_CallIntMethod_13
|
||||
JNIEnv_CallIntMethod_14
|
||||
JNIEnv_CallIntMethod_15
|
||||
JNIEnv_CallIntMethod_16
|
||||
JNIEnv_CallIntMethod_17
|
||||
JNIEnv_CallIntMethod_18
|
||||
JNIEnv_CallIntMethod_19
|
||||
JNIEnv_CallIntMethod_1
|
||||
JNIEnv_CallIntMethod_2
|
||||
JNIEnv_CallIntMethod_3
|
||||
JNIEnv_CallIntMethod_4
|
||||
JNIEnv_CallIntMethod_5
|
||||
JNIEnv_CallIntMethod_6
|
||||
JNIEnv_CallIntMethod_7
|
||||
JNIEnv_CallIntMethod_8
|
||||
JNIEnv_CallIntMethod_9
|
||||
JNIEnv_CallLongMethod_1
|
||||
JNIEnv_CallLongMethod_2
|
||||
JNIEnv_CallLongMethod_3
|
||||
JNIEnv_CallLongMethod_4
|
||||
JNIEnv_CallNonvirtualBooleanMethod_1
|
||||
JNIEnv_CallNonvirtualBooleanMethod_2
|
||||
JNIEnv_CallNonvirtualBooleanMethod_3
|
||||
JNIEnv_CallNonvirtualBooleanMethod_4
|
||||
JNIEnv_CallNonvirtualByteMethod_1
|
||||
JNIEnv_CallNonvirtualByteMethod_2
|
||||
JNIEnv_CallNonvirtualByteMethod_3
|
||||
JNIEnv_CallNonvirtualByteMethod_4
|
||||
JNIEnv_CallNonvirtualCharMethod_1
|
||||
JNIEnv_CallNonvirtualCharMethod_2
|
||||
JNIEnv_CallNonvirtualCharMethod_3
|
||||
JNIEnv_CallNonvirtualCharMethod_4
|
||||
JNIEnv_CallNonvirtualDoubleMethod_1
|
||||
JNIEnv_CallNonvirtualDoubleMethod_2
|
||||
JNIEnv_CallNonvirtualDoubleMethod_3
|
||||
JNIEnv_CallNonvirtualDoubleMethod_4
|
||||
JNIEnv_CallNonvirtualFloatMethod_1
|
||||
JNIEnv_CallNonvirtualFloatMethod_2
|
||||
JNIEnv_CallNonvirtualFloatMethod_3
|
||||
JNIEnv_CallNonvirtualFloatMethod_4
|
||||
JNIEnv_CallNonvirtualIntMethod_10
|
||||
JNIEnv_CallNonvirtualIntMethod_11
|
||||
JNIEnv_CallNonvirtualIntMethod_12
|
||||
JNIEnv_CallNonvirtualIntMethod_13
|
||||
JNIEnv_CallNonvirtualIntMethod_14
|
||||
JNIEnv_CallNonvirtualIntMethod_15
|
||||
JNIEnv_CallNonvirtualIntMethod_16
|
||||
JNIEnv_CallNonvirtualIntMethod_18
|
||||
JNIEnv_CallNonvirtualIntMethod_19
|
||||
JNIEnv_CallNonvirtualIntMethod_1
|
||||
JNIEnv_CallNonvirtualIntMethod_21
|
||||
JNIEnv_CallNonvirtualIntMethod_22
|
||||
JNIEnv_CallNonvirtualIntMethod_23
|
||||
JNIEnv_CallNonvirtualIntMethod_24
|
||||
JNIEnv_CallNonvirtualIntMethod_25
|
||||
JNIEnv_CallNonvirtualIntMethod_26
|
||||
JNIEnv_CallNonvirtualIntMethod_27
|
||||
JNIEnv_CallNonvirtualIntMethod_28
|
||||
JNIEnv_CallNonvirtualIntMethod_29
|
||||
JNIEnv_CallNonvirtualIntMethod_2
|
||||
JNIEnv_CallNonvirtualIntMethod_30
|
||||
JNIEnv_CallNonvirtualIntMethod_31
|
||||
JNIEnv_CallNonvirtualIntMethod_32
|
||||
JNIEnv_CallNonvirtualIntMethod_33
|
||||
JNIEnv_CallNonvirtualIntMethod_34
|
||||
JNIEnv_CallNonvirtualIntMethod_4
|
||||
JNIEnv_CallNonvirtualIntMethod_5
|
||||
JNIEnv_CallNonvirtualIntMethod_7
|
||||
JNIEnv_CallNonvirtualIntMethod_8
|
||||
JNIEnv_CallNonvirtualIntMethod_9
|
||||
JNIEnv_CallNonvirtualLongMethod_1
|
||||
JNIEnv_CallNonvirtualLongMethod_2
|
||||
JNIEnv_CallNonvirtualLongMethod_3
|
||||
JNIEnv_CallNonvirtualLongMethod_4
|
||||
JNIEnv_CallNonvirtualObjectMethod_1
|
||||
JNIEnv_CallNonvirtualObjectMethod_2
|
||||
JNIEnv_CallNonvirtualObjectMethod_3
|
||||
JNIEnv_CallNonvirtualObjectMethod_4
|
||||
JNIEnv_CallNonvirtualObjectMethod_5
|
||||
JNIEnv_CallNonvirtualObjectMethod_6
|
||||
JNIEnv_CallNonvirtualObjectMethod_7
|
||||
JNIEnv_CallNonvirtualShortMethod_1
|
||||
JNIEnv_CallNonvirtualShortMethod_2
|
||||
JNIEnv_CallNonvirtualShortMethod_3
|
||||
JNIEnv_CallNonvirtualShortMethod_4
|
||||
JNIEnv_CallNonvirtualVoidMethod_1
|
||||
JNIEnv_CallNonvirtualVoidMethod_2
|
||||
JNIEnv_CallObjectMethod_1
|
||||
JNIEnv_CallObjectMethod_2
|
||||
JNIEnv_CallObjectMethod_3
|
||||
JNIEnv_CallObjectMethod_4
|
||||
JNIEnv_CallObjectMethod_5
|
||||
JNIEnv_CallObjectMethod_6
|
||||
JNIEnv_CallObjectMethod_7
|
||||
JNIEnv_CallShortMethod_1
|
||||
JNIEnv_CallShortMethod_2
|
||||
JNIEnv_CallShortMethod_3
|
||||
JNIEnv_CallShortMethod_4
|
||||
JNIEnv_CallStaticBooleanMethod_1
|
||||
JNIEnv_CallStaticBooleanMethod_2
|
||||
JNIEnv_CallStaticBooleanMethod_3
|
||||
JNIEnv_CallStaticBooleanMethod_4
|
||||
JNIEnv_CallStaticByteMethod_1
|
||||
JNIEnv_CallStaticByteMethod_2
|
||||
JNIEnv_CallStaticByteMethod_3
|
||||
JNIEnv_CallStaticByteMethod_4
|
||||
JNIEnv_CallStaticCharMethod_1
|
||||
JNIEnv_CallStaticCharMethod_2
|
||||
JNIEnv_CallStaticCharMethod_3
|
||||
JNIEnv_CallStaticCharMethod_4
|
||||
JNIEnv_CallStaticDoubleMethod_1
|
||||
JNIEnv_CallStaticDoubleMethod_2
|
||||
JNIEnv_CallStaticDoubleMethod_3
|
||||
JNIEnv_CallStaticDoubleMethod_4
|
||||
JNIEnv_CallStaticFloatMethod_1
|
||||
JNIEnv_CallStaticFloatMethod_2
|
||||
JNIEnv_CallStaticFloatMethod_3
|
||||
JNIEnv_CallStaticFloatMethod_4
|
||||
JNIEnv_CallStaticIntMethod_10
|
||||
JNIEnv_CallStaticIntMethod_11
|
||||
JNIEnv_CallStaticIntMethod_12
|
||||
JNIEnv_CallStaticIntMethod_13
|
||||
JNIEnv_CallStaticIntMethod_14
|
||||
JNIEnv_CallStaticIntMethod_15
|
||||
JNIEnv_CallStaticIntMethod_16
|
||||
JNIEnv_CallStaticIntMethod_18
|
||||
JNIEnv_CallStaticIntMethod_19
|
||||
JNIEnv_CallStaticIntMethod_1
|
||||
JNIEnv_CallStaticIntMethod_20
|
||||
JNIEnv_CallStaticIntMethod_21
|
||||
JNIEnv_CallStaticIntMethod_2
|
||||
JNIEnv_CallStaticIntMethod_4
|
||||
JNIEnv_CallStaticIntMethod_5
|
||||
JNIEnv_CallStaticIntMethod_7
|
||||
JNIEnv_CallStaticIntMethod_8
|
||||
JNIEnv_CallStaticIntMethod_9
|
||||
JNIEnv_CallStaticLongMethod_1
|
||||
JNIEnv_CallStaticLongMethod_2
|
||||
JNIEnv_CallStaticLongMethod_3
|
||||
JNIEnv_CallStaticLongMethod_4
|
||||
JNIEnv_CallStaticObjectMethod_1
|
||||
JNIEnv_CallStaticObjectMethod_2
|
||||
JNIEnv_CallStaticObjectMethod_3
|
||||
JNIEnv_CallStaticObjectMethod_4
|
||||
JNIEnv_CallStaticObjectMethod_5
|
||||
JNIEnv_CallStaticObjectMethod_6
|
||||
JNIEnv_CallStaticObjectMethod_7
|
||||
JNIEnv_CallStaticShortMethod_1
|
||||
JNIEnv_CallStaticShortMethod_2
|
||||
JNIEnv_CallStaticShortMethod_3
|
||||
JNIEnv_CallStaticShortMethod_4
|
||||
JNIEnv_CallStaticVoidMethod_1
|
||||
JNIEnv_CallStaticVoidMethod_2
|
||||
JNIEnv_CallVoidMethod_1
|
||||
JNIEnv_CallVoidMethod_2
|
||||
JNIEnv_DeleteGlobalRef_1
|
||||
JNIEnv_DeleteGlobalRef_2
|
||||
JNIEnv_DeleteLocalRef_1
|
||||
JNIEnv_DeleteLocalRef_2
|
||||
JNIEnv_ExceptionClear_1
|
||||
JNIEnv_ExceptionClear_2
|
||||
JNIEnv_ExceptionDescribe_1
|
||||
JNIEnv_ExceptionDescribe_2
|
||||
JNIEnv_FindClass_2
|
||||
JNIEnv_FindClass_3
|
||||
JNIEnv_FindClass_4
|
||||
JNIEnv_FindClass_5
|
||||
JNIEnv_FindClass_6
|
||||
JNIEnv_FindClass_7
|
||||
JNIEnv_FindClass_8
|
||||
JNIEnv_GetArrayLength_1
|
||||
JNIEnv_GetArrayLength_3
|
||||
JNIEnv_GetBooleanArrayElements_2
|
||||
JNIEnv_GetBooleanArrayElements_3
|
||||
JNIEnv_GetBooleanArrayRegion_1
|
||||
JNIEnv_GetBooleanField_1
|
||||
JNIEnv_GetBooleanField_5
|
||||
JNIEnv_GetBooleanField_6
|
||||
JNIEnv_GetByteArrayElements_2
|
||||
JNIEnv_GetByteArrayElements_3
|
||||
JNIEnv_GetByteArrayRegion_1
|
||||
JNIEnv_GetByteField_1
|
||||
JNIEnv_GetByteField_5
|
||||
JNIEnv_GetByteField_6
|
||||
JNIEnv_GetCharArrayElements_2
|
||||
JNIEnv_GetCharArrayElements_3
|
||||
JNIEnv_GetCharArrayRegion_1
|
||||
JNIEnv_GetCharField_1
|
||||
JNIEnv_GetCharField_5
|
||||
JNIEnv_GetDoubleArrayElements_2
|
||||
JNIEnv_GetDoubleArrayElements_3
|
||||
JNIEnv_GetDoubleArrayRegion_1
|
||||
JNIEnv_GetDoubleField_1
|
||||
JNIEnv_GetDoubleField_5
|
||||
JNIEnv_GetDoubleField_6
|
||||
JNIEnv_GetFieldID_10
|
||||
JNIEnv_GetFieldID_11
|
||||
JNIEnv_GetFieldID_12
|
||||
JNIEnv_GetFieldID_13
|
||||
JNIEnv_GetFieldID_15
|
||||
JNIEnv_GetFieldID_16
|
||||
JNIEnv_GetFieldID_17
|
||||
JNIEnv_GetFieldID_18
|
||||
JNIEnv_GetFieldID_19
|
||||
JNIEnv_GetFieldID_20
|
||||
JNIEnv_GetFieldID_3
|
||||
JNIEnv_GetFieldID_4
|
||||
JNIEnv_GetFieldID_6
|
||||
JNIEnv_GetFieldID_7
|
||||
JNIEnv_GetFieldID_8
|
||||
JNIEnv_GetFieldID_9
|
||||
JNIEnv_GetFloatArrayElements_2
|
||||
JNIEnv_GetFloatArrayElements_3
|
||||
JNIEnv_GetFloatArrayRegion_1
|
||||
JNIEnv_GetFloatField_1
|
||||
JNIEnv_GetFloatField_5
|
||||
JNIEnv_GetFloatField_6
|
||||
JNIEnv_GetIntArrayElements_2
|
||||
JNIEnv_GetIntArrayElements_3
|
||||
JNIEnv_GetIntArrayRegion_1
|
||||
JNIEnv_GetIntArrayRegion_2
|
||||
JNIEnv_GetIntArrayRegion_4
|
||||
JNIEnv_GetIntField_1
|
||||
JNIEnv_GetIntField_5
|
||||
JNIEnv_GetIntField_6
|
||||
JNIEnv_GetIntField_7
|
||||
JNIEnv_GetJavaVM_2
|
||||
JNIEnv_GetLongArrayElements_2
|
||||
JNIEnv_GetLongArrayElements_3
|
||||
JNIEnv_GetLongArrayRegion_1
|
||||
JNIEnv_GetLongField_1
|
||||
JNIEnv_GetLongField_5
|
||||
JNIEnv_GetLongField_6
|
||||
JNIEnv_GetMethodID_10
|
||||
JNIEnv_GetMethodID_11
|
||||
JNIEnv_GetMethodID_12
|
||||
JNIEnv_GetMethodID_13
|
||||
JNIEnv_GetMethodID_15
|
||||
JNIEnv_GetMethodID_16
|
||||
JNIEnv_GetMethodID_17
|
||||
JNIEnv_GetMethodID_18
|
||||
JNIEnv_GetMethodID_19
|
||||
JNIEnv_GetMethodID_20
|
||||
JNIEnv_GetMethodID_21
|
||||
JNIEnv_GetMethodID_22
|
||||
JNIEnv_GetMethodID_23
|
||||
JNIEnv_GetMethodID_24
|
||||
JNIEnv_GetMethodID_25
|
||||
JNIEnv_GetMethodID_26
|
||||
JNIEnv_GetMethodID_27
|
||||
JNIEnv_GetMethodID_28
|
||||
JNIEnv_GetMethodID_29
|
||||
JNIEnv_GetMethodID_30
|
||||
JNIEnv_GetMethodID_31
|
||||
JNIEnv_GetMethodID_32
|
||||
JNIEnv_GetMethodID_33
|
||||
JNIEnv_GetMethodID_34
|
||||
JNIEnv_GetMethodID_35
|
||||
JNIEnv_GetMethodID_36
|
||||
JNIEnv_GetMethodID_37
|
||||
JNIEnv_GetMethodID_38
|
||||
JNIEnv_GetMethodID_39
|
||||
JNIEnv_GetMethodID_5
|
||||
JNIEnv_GetMethodID_6
|
||||
JNIEnv_GetMethodID_7
|
||||
JNIEnv_GetMethodID_8
|
||||
JNIEnv_GetMethodID_9
|
||||
JNIEnv_GetObjectArrayElement_1
|
||||
JNIEnv_GetObjectArrayElement_2
|
||||
JNIEnv_GetObjectArrayElement_4
|
||||
JNIEnv_GetObjectArrayElement_5
|
||||
JNIEnv_GetObjectClass_1
|
||||
JNIEnv_GetObjectField_1
|
||||
JNIEnv_GetShortArrayElements_2
|
||||
JNIEnv_GetShortArrayElements_3
|
||||
JNIEnv_GetShortArrayRegion_1
|
||||
JNIEnv_GetShortField_1
|
||||
JNIEnv_GetShortField_5
|
||||
JNIEnv_GetShortField_6
|
||||
JNIEnv_GetStaticBooleanField_1
|
||||
JNIEnv_GetStaticBooleanField_5
|
||||
JNIEnv_GetStaticBooleanField_6
|
||||
JNIEnv_GetStaticByteField_1
|
||||
JNIEnv_GetStaticByteField_5
|
||||
JNIEnv_GetStaticByteField_6
|
||||
JNIEnv_GetStaticCharField_1
|
||||
JNIEnv_GetStaticCharField_5
|
||||
JNIEnv_GetStaticDoubleField_1
|
||||
JNIEnv_GetStaticDoubleField_5
|
||||
JNIEnv_GetStaticFieldID_10
|
||||
JNIEnv_GetStaticFieldID_11
|
||||
JNIEnv_GetStaticFieldID_12
|
||||
JNIEnv_GetStaticFieldID_13
|
||||
JNIEnv_GetStaticFieldID_14
|
||||
JNIEnv_GetStaticFieldID_15
|
||||
JNIEnv_GetStaticFieldID_16
|
||||
JNIEnv_GetStaticFieldID_17
|
||||
JNIEnv_GetStaticFieldID_18
|
||||
JNIEnv_GetStaticFieldID_19
|
||||
JNIEnv_GetStaticFieldID_20
|
||||
JNIEnv_GetStaticFieldID_4
|
||||
JNIEnv_GetStaticFieldID_5
|
||||
JNIEnv_GetStaticFieldID_6
|
||||
JNIEnv_GetStaticFieldID_7
|
||||
JNIEnv_GetStaticFieldID_8
|
||||
JNIEnv_GetStaticFieldID_9
|
||||
JNIEnv_GetStaticFloatField_1
|
||||
JNIEnv_GetStaticFloatField_5
|
||||
JNIEnv_GetStaticFloatField_6
|
||||
JNIEnv_GetStaticIntField_1
|
||||
JNIEnv_GetStaticIntField_5
|
||||
JNIEnv_GetStaticIntField_6
|
||||
JNIEnv_GetStaticLongField_1
|
||||
JNIEnv_GetStaticLongField_5
|
||||
JNIEnv_GetStaticLongField_6
|
||||
JNIEnv_GetStaticMethodID_10
|
||||
JNIEnv_GetStaticMethodID_11
|
||||
JNIEnv_GetStaticMethodID_12
|
||||
JNIEnv_GetStaticMethodID_13
|
||||
JNIEnv_GetStaticMethodID_14
|
||||
JNIEnv_GetStaticMethodID_16
|
||||
JNIEnv_GetStaticMethodID_17
|
||||
JNIEnv_GetStaticMethodID_18
|
||||
JNIEnv_GetStaticMethodID_19
|
||||
JNIEnv_GetStaticMethodID_20
|
||||
JNIEnv_GetStaticMethodID_21
|
||||
JNIEnv_GetStaticMethodID_6
|
||||
JNIEnv_GetStaticMethodID_7
|
||||
JNIEnv_GetStaticMethodID_8
|
||||
JNIEnv_GetStaticMethodID_9
|
||||
JNIEnv_GetStaticObjectField_1
|
||||
JNIEnv_GetStaticObjectField_5
|
||||
JNIEnv_GetStaticShortField_1
|
||||
JNIEnv_GetStaticShortField_5
|
||||
JNIEnv_GetStaticShortField_6
|
||||
JNIEnv_GetStringChars_4
|
||||
JNIEnv_GetStringLength_2
|
||||
JNIEnv_GetStringLength_3
|
||||
JNIEnv_GetStringUTFChars_1
|
||||
JNIEnv_GetStringUTFChars_3
|
||||
JNIEnv_GetStringUTFChars_4
|
||||
JNIEnv_GetStringUTFLength_1
|
||||
JNIEnv_GetStringUTFLength_2
|
||||
JNIEnv_GetSuperclass_2
|
||||
JNIEnv_GetSuperclass_3
|
||||
JNIEnv_GetSuperclass_4
|
||||
JNIEnv_GetVersion_1
|
||||
JNIEnv_IsAssignableFrom_1
|
||||
JNIEnv_IsAssignableFrom_3
|
||||
JNIEnv_IsAssignableFrom_4
|
||||
JNIEnv_IsAssignableFrom_5
|
||||
JNIEnv_IsInstanceOf_1
|
||||
JNIEnv_IsInstanceOf_2
|
||||
JNIEnv_IsInstanceOf_3
|
||||
JNIEnv_IsInstanceOf_4
|
||||
JNIEnv_IsInstanceOf_5
|
||||
JNIEnv_IsSameObject_1
|
||||
JNIEnv_IsSameObject_2
|
||||
JNIEnv_IsSameObject_3
|
||||
JNIEnv_IsSameObject_4
|
||||
JNIEnv_NewBooleanArray_1
|
||||
JNIEnv_NewBooleanArray_2
|
||||
JNIEnv_NewBooleanArray_3
|
||||
JNIEnv_NewByteArray_1
|
||||
JNIEnv_NewByteArray_2
|
||||
JNIEnv_NewByteArray_3
|
||||
JNIEnv_NewCharArray_1
|
||||
JNIEnv_NewCharArray_2
|
||||
JNIEnv_NewCharArray_3
|
||||
JNIEnv_NewDoubleArray_1
|
||||
JNIEnv_NewDoubleArray_2
|
||||
JNIEnv_NewDoubleArray_3
|
||||
JNIEnv_NewFloatArray_1
|
||||
JNIEnv_NewFloatArray_2
|
||||
JNIEnv_NewFloatArray_3
|
||||
JNIEnv_NewGlobalRef_1
|
||||
JNIEnv_NewGlobalRef_2
|
||||
JNIEnv_NewIntArray_1
|
||||
JNIEnv_NewIntArray_2
|
||||
JNIEnv_NewIntArray_3
|
||||
JNIEnv_NewLongArray_1
|
||||
JNIEnv_NewLongArray_2
|
||||
JNIEnv_NewLongArray_3
|
||||
JNIEnv_NewObjectA_1
|
||||
JNIEnv_NewObjectA_3
|
||||
JNIEnv_NewObjectA_4
|
||||
JNIEnv_NewObjectA_9
|
||||
JNIEnv_NewObjectArray_1
|
||||
JNIEnv_NewObjectArray_3
|
||||
JNIEnv_NewObjectArray_4
|
||||
JNIEnv_NewObjectArray_5
|
||||
JNIEnv_NewObject_1
|
||||
JNIEnv_NewObject_3
|
||||
JNIEnv_NewObject_4
|
||||
JNIEnv_NewObject_9
|
||||
JNIEnv_NewShortArray_1
|
||||
JNIEnv_NewShortArray_2
|
||||
JNIEnv_NewShortArray_3
|
||||
JNIEnv_NewStringUTF_1
|
||||
JNIEnv_NewStringUTF_2
|
||||
JNIEnv_NewStringUTF_3
|
||||
JNIEnv_NewString_2
|
||||
JNIEnv_NewString_3
|
||||
JNIEnv_ReleaseBooleanArrayElements_1
|
||||
JNIEnv_ReleaseBooleanArrayElements_2
|
||||
JNIEnv_ReleaseBooleanArrayElements_3
|
||||
JNIEnv_ReleaseByteArrayElements_1
|
||||
JNIEnv_ReleaseByteArrayElements_2
|
||||
JNIEnv_ReleaseByteArrayElements_3
|
||||
JNIEnv_ReleaseCharArrayElements_1
|
||||
JNIEnv_ReleaseCharArrayElements_2
|
||||
JNIEnv_ReleaseCharArrayElements_3
|
||||
JNIEnv_ReleaseDoubleArrayElements_1
|
||||
JNIEnv_ReleaseDoubleArrayElements_2
|
||||
JNIEnv_ReleaseDoubleArrayElements_3
|
||||
JNIEnv_ReleaseFloatArrayElements_1
|
||||
JNIEnv_ReleaseFloatArrayElements_2
|
||||
JNIEnv_ReleaseFloatArrayElements_3
|
||||
JNIEnv_ReleaseIntArrayElements_1
|
||||
JNIEnv_ReleaseIntArrayElements_2
|
||||
JNIEnv_ReleaseIntArrayElements_3
|
||||
JNIEnv_ReleaseLongArrayElements_1
|
||||
JNIEnv_ReleaseLongArrayElements_2
|
||||
JNIEnv_ReleaseLongArrayElements_3
|
||||
JNIEnv_ReleaseShortArrayElements_1
|
||||
JNIEnv_ReleaseShortArrayElements_2
|
||||
JNIEnv_ReleaseShortArrayElements_3
|
||||
JNIEnv_ReleaseStringChars_2
|
||||
JNIEnv_ReleaseStringUTFChars_1
|
||||
JNIEnv_ReleaseStringUTFChars_2
|
||||
JNIEnv_SetBooleanArrayRegion_1
|
||||
JNIEnv_SetBooleanField_1
|
||||
JNIEnv_SetBooleanField_5
|
||||
JNIEnv_SetBooleanField_6
|
||||
JNIEnv_SetBooleanField_7
|
||||
JNIEnv_SetByteArrayRegion_1
|
||||
JNIEnv_SetByteField_1
|
||||
JNIEnv_SetByteField_5
|
||||
JNIEnv_SetByteField_6
|
||||
JNIEnv_SetCharArrayRegion_1
|
||||
JNIEnv_SetCharField_1
|
||||
JNIEnv_SetCharField_5
|
||||
JNIEnv_SetCharField_6
|
||||
JNIEnv_SetDoubleArrayRegion_1
|
||||
JNIEnv_SetDoubleField_1
|
||||
JNIEnv_SetDoubleField_5
|
||||
JNIEnv_SetDoubleField_6
|
||||
JNIEnv_SetFloatArrayRegion_1
|
||||
JNIEnv_SetFloatField_1
|
||||
JNIEnv_SetFloatField_5
|
||||
JNIEnv_SetIntArrayRegion_1
|
||||
JNIEnv_SetIntArrayRegion_2
|
||||
JNIEnv_SetIntArrayRegion_4
|
||||
JNIEnv_SetIntField_1
|
||||
JNIEnv_SetIntField_5
|
||||
JNIEnv_SetLongArrayRegion_1
|
||||
JNIEnv_SetLongField_1
|
||||
JNIEnv_SetLongField_5
|
||||
JNIEnv_SetObjectArrayElement_1
|
||||
JNIEnv_SetObjectArrayElement_2
|
||||
JNIEnv_SetObjectArrayElement_3
|
||||
JNIEnv_SetObjectArrayElement_4
|
||||
JNIEnv_SetObjectArrayElement_5
|
||||
JNIEnv_SetObjectField_5
|
||||
JNIEnv_SetShortArrayRegion_1
|
||||
JNIEnv_SetShortField_1
|
||||
JNIEnv_SetShortField_5
|
||||
JNIEnv_SetStaticBooleanField_1
|
||||
JNIEnv_SetStaticBooleanField_5
|
||||
JNIEnv_SetStaticBooleanField_6
|
||||
JNIEnv_SetStaticByteField_1
|
||||
JNIEnv_SetStaticByteField_5
|
||||
JNIEnv_SetStaticByteField_6
|
||||
JNIEnv_SetStaticCharField_1
|
||||
JNIEnv_SetStaticCharField_5
|
||||
JNIEnv_SetStaticCharField_6
|
||||
JNIEnv_SetStaticDoubleField_1
|
||||
JNIEnv_SetStaticDoubleField_5
|
||||
JNIEnv_SetStaticDoubleField_6
|
||||
JNIEnv_SetStaticFloatField_1
|
||||
JNIEnv_SetStaticFloatField_5
|
||||
JNIEnv_SetStaticIntField_1
|
||||
JNIEnv_SetStaticIntField_5
|
||||
JNIEnv_SetStaticLongField_1
|
||||
JNIEnv_SetStaticLongField_5
|
||||
JNIEnv_SetStaticObjectField_1
|
||||
JNIEnv_SetStaticObjectField_5
|
||||
JNIEnv_SetStaticShortField_1
|
||||
JNIEnv_SetStaticShortField_5
|
||||
JNIEnv_ThrowNew_1
|
||||
JNIEnv_ThrowNew_2
|
||||
JNIEnv_ThrowNew_3
|
||||
JNIEnv_ThrowNew_4
|
||||
#
|
||||
####################### JVM Manager tests #######################
|
||||
#
|
||||
JVMManager_CreateProxyJNI_1
|
||||
JVMManager_CreateProxyJNI_4
|
||||
JVMManager_GetProxyJNI_2
|
||||
JVMManager_GetProxyJNI_3
|
||||
JVMManager_ShowJavaConsole_1
|
||||
JVMManager_ShowJavaConsole_2
|
||||
#
|
||||
####################### Live Connect Manager tests ##############
|
||||
#
|
||||
LCM_IsLiveConnectEnabled_2
|
||||
LCM_WrapJavaObject_1
|
||||
#
|
||||
####################### Thread Manager tests ####################
|
||||
#
|
||||
ThreadManager_CreateThread_4
|
||||
ThreadManager_EnterMonitor_4
|
||||
ThreadManager_ExitMonitor_1
|
||||
ThreadManager_ExitMonitor_3
|
||||
ThreadManager_ExitMonitor_4
|
||||
ThreadManager_GetCurrentThread_1
|
||||
ThreadManager_NotifyAll_3
|
||||
ThreadManager_NotifyAll_4
|
||||
ThreadManager_Notify_1
|
||||
ThreadManager_Notify_3
|
||||
ThreadManager_Notify_4
|
||||
ThreadManager_PostEvent_2
|
||||
ThreadManager_PostEvent_3
|
||||
ThreadManager_PostEvent_5
|
||||
ThreadManager_PostEvent_6
|
||||
ThreadManager_PostEvent_7
|
||||
ThreadManager_Sleep_1
|
||||
ThreadManager_Sleep_2
|
||||
ThreadManager_Wait_1
|
||||
ThreadManager_Wait_2
|
||||
ThreadManager_Wait_3
|
||||
ThreadManager_Wait_4
|
|
@ -47,23 +47,21 @@ use File::Copy;
|
|||
# #
|
||||
########################
|
||||
|
||||
|
||||
#sometimes we need to specify additional parameters for mozilla
|
||||
$ADDITIONAL_PARAMETERS="-P mozProfile";
|
||||
|
||||
# time in seconds after which the apprunner has to be killed.
|
||||
# by default the apprunner will be up for so much time regardless of
|
||||
# whether over or not. User can either decrease it or increase it.
|
||||
#
|
||||
$DELAY_FACTOR = 30;
|
||||
|
||||
|
||||
#Mozilla's executable
|
||||
$MOZILLA_EXECUTABLE="mozilla-bin";
|
||||
if ($^O =~ /Win32/i) {
|
||||
$MOZILLA_EXECUTABLE="mozilla.exe";
|
||||
}
|
||||
|
||||
#sometimes we need to specify additional parameters for mozilla
|
||||
$ADDITIONAL_PARAMETERS="-P default";
|
||||
|
||||
# time in seconds after which the apprunner has to be killed.
|
||||
# by default the apprunner will be up for so much time regardless of
|
||||
# whether over or not. User can either decrease it or increase it.
|
||||
#
|
||||
$DELAY_FACTOR = 50;
|
||||
|
||||
$FULL_TEST_LIST="OJITestsList.lst";
|
||||
|
||||
$TEST_RESULTS="OJITestResults.txt";
|
||||
|
@ -71,7 +69,8 @@ $TEST_RESULTS="OJITestResults.txt";
|
|||
$TEST_DESCRIPTIONS="../OJIAPITestsDescr.html";
|
||||
$TARGET_WINDOW="Test Descriptions";
|
||||
|
||||
$DEFAULT_TEST_URL="http://shiva:10001/oji";
|
||||
$curdir = cwd();
|
||||
$DEFAULT_TEST_URL="file:///$curdir";
|
||||
|
||||
# time period in seconds of periodically checking: is the apprunner still alive
|
||||
$DELAY_OF_CYCLE = 1;
|
||||
|
@ -86,6 +85,7 @@ $DOCROOT = $ENV{"TEST_URL"} ? $ENV{"TEST_URL"} : $DEFAULT_TEST_URL;
|
|||
|
||||
# delimiter for logfile
|
||||
$delimiter="###################################################\n";
|
||||
$nosort=0;
|
||||
|
||||
|
||||
##################################################################
|
||||
|
@ -95,10 +95,28 @@ sub usage() {
|
|||
|
||||
print "\n";
|
||||
print "##################################################################\n";
|
||||
print " perl autorun.pl [ -t <test case> ]\n";
|
||||
print " perl autorun.pl [ -help ] [ -genhtml [ ALL/PASS/FAILED/<test_type> ] ] [ -compare [ <output_file> <file1> <file2> ] ] [ -t <test_case> ]\n";
|
||||
print "\n";
|
||||
print " where <test case> is one of the test cases\n";
|
||||
print " name ex: JVMManager_CreateProxyJNI_1\n";
|
||||
print " -help This message.\n\n";
|
||||
print " -compare <output_file> <file1> <file2> \n";
|
||||
print " Compares two test result files and generates the diff files\n";
|
||||
print " <output_file> the resulting diff files in text (.txt)\n";
|
||||
print " and HTML (.html) formats\n";
|
||||
print " <file1(2)> files to be compared (optional parameters)\n";
|
||||
print " should contain test results in text format\n";
|
||||
print " (generated by autorun.pl as BWTest.txt);\n";
|
||||
print " if ommited the default values are used: \n";
|
||||
print " <file1> => log/BWTest.txt \n";
|
||||
print " <file2> => log/BWTest.txt.bak \n\n";
|
||||
print " -genhtml <option> Generates report in HTML format (without tests execution).\n";
|
||||
print " ALL Generates report for all executed tests. \n";
|
||||
print " PASS Generates report for passed tests\n";
|
||||
print " FAILED Generates report for failed tests\n";
|
||||
print " <test_type> Generates report for the specific <test_type>\n";
|
||||
print " <test_type> = JNIEnv/LCM/ThreadManager/JVMManager\n";
|
||||
print " If specified all other parameters are ignored\n\n";
|
||||
print " -t <test case> Executes the specified <test_case>.\n";
|
||||
print " test_case example: JVMManager_CreateProxyJNI_1\n";
|
||||
print "\n";
|
||||
print "##################################################################\n";
|
||||
print "\n";
|
||||
|
@ -114,12 +132,7 @@ sub title() {
|
|||
print "################################################\n";
|
||||
print " Automated Execution of OJI API TestSuite\n";
|
||||
print "################################################\n";
|
||||
print "\n";
|
||||
print "NOTE: You need to copy files test.html into \n";
|
||||
print " some document directory of HTTP server. TEST_URL environment \n";
|
||||
print " variable should contain the URL of this directory.\n";
|
||||
print "\n";
|
||||
print "\n";
|
||||
print "\n\n";
|
||||
|
||||
}
|
||||
|
||||
|
@ -198,10 +211,10 @@ sub constructHTMLBody() {
|
|||
my $line;
|
||||
my $f_cnt = 0;
|
||||
my $p_cnt = 0;
|
||||
foreach $line ( sort @all_lines ) {
|
||||
foreach $line ( ($nosort) ? @all_lines : sort @all_lines ) {
|
||||
# avoid linebreaks
|
||||
chop $line;
|
||||
if ($line eq "") {
|
||||
if ($line eq "" || $line =~ /^\0*$/ || $line =~ /^\s*$/) {
|
||||
next;
|
||||
}
|
||||
$comment = "---";
|
||||
|
@ -210,17 +223,22 @@ sub constructHTMLBody() {
|
|||
if ($status =~ /(.*?) \((.*?)\)$/) {
|
||||
$status = $1;
|
||||
$comment = $2 ? $2 : "---";
|
||||
$p_cnt++;
|
||||
}
|
||||
if ($status =~ /FAIL/) {
|
||||
$status = "<font color=\"red\">".$status;
|
||||
$status = $status."<\/font>";
|
||||
$f_cnt++;
|
||||
} elsif ($status =~ /PASS/) {
|
||||
$p_cnt++;
|
||||
}
|
||||
if ($genparam eq "ALL" || ($genparam ne "" && $line =~ /$genparam/)) {
|
||||
print LOGHTML "<tr><td><a target=\"$TARGET_WINDOW\" href=\"$TEST_DESCRIPTIONS#$class\">",$class,"</a></td><td>",$status,"</td><td>",$comment,"</td></tr>\n";
|
||||
}
|
||||
my $pp = sprintf "%.2f", $p_cnt/($p_cnt+$f_cnt)*100;
|
||||
my $pf = sprintf "%.2f", $f_cnt/($p_cnt+$f_cnt)*100;
|
||||
}
|
||||
if ($p_cnt+$f_cnt) {
|
||||
$pp = sprintf "%.2f", $p_cnt/($p_cnt+$f_cnt)*100;
|
||||
$pf = sprintf "%.2f", $f_cnt/($p_cnt+$f_cnt)*100;
|
||||
}
|
||||
print LOGHTML "<tr><td colspan=3>Total: $p_cnt($pp\%) tests passed and $f_cnt($pf\%) tests failed.</td></tr>\n";
|
||||
}
|
||||
|
||||
|
@ -422,6 +440,93 @@ sub RunTestCaseUnix {
|
|||
}
|
||||
|
||||
|
||||
sub compareResults {
|
||||
$out_fn = shift;
|
||||
$fn1 = shift;
|
||||
$fn2 = shift;
|
||||
if (!defined($out_fn)) {
|
||||
$out_fn = "$curdir/log/diff";
|
||||
}
|
||||
if (!defined($fn2)) {
|
||||
$fn2 = "$curdir/log/BWTest.txt.bak";
|
||||
}
|
||||
if (!defined($fn1)) {
|
||||
$fn1 = "$curdir/log/BWTest.txt";
|
||||
}
|
||||
|
||||
(-f $fn1 && open(IN1, "<$fn1")) || die "Can't open file $fn1: $!\n";
|
||||
(-f $fn2 && open(IN2, "<$fn2")) || die "Can't open file $fn2: $!\n";
|
||||
open(OUT_TXT, ">$out_fn".".txt") || die "Can't open output file $out_fn.txt: $!\n";
|
||||
$genparam = "ALL";
|
||||
$nosort = 1;
|
||||
|
||||
my %res1;
|
||||
my %line1;
|
||||
my %res2;
|
||||
my $ln = 0;
|
||||
my $j=0;
|
||||
|
||||
while($line = <IN1>) {
|
||||
$ln ++;
|
||||
chop $line;
|
||||
if ($line =~ /(.*): (.*)/) {
|
||||
$res1{$1} = $2;
|
||||
$line1{$1} = $line;
|
||||
} else {
|
||||
die "File format error in file $fn1, line $ln: $line\n";
|
||||
}
|
||||
}
|
||||
$ln = 0;
|
||||
while($line = <IN2>) {
|
||||
$ln ++;
|
||||
chop $line;
|
||||
if ($line =~ /(.*): (.*)/) {
|
||||
if (defined($res1{$1})) {
|
||||
if ($res1{$1} ne $2) {
|
||||
print OUT_TXT $line1{$1}."\n";
|
||||
print OUT_TXT $line."\n";
|
||||
}
|
||||
delete $res1{$1};
|
||||
} else {
|
||||
$new_in_2[$j++] = $line;
|
||||
#file2 contain extra tests (that file1 doesn't contain)
|
||||
#file1 can also contain extra tests (that file2 doen't contain)
|
||||
#do we need to report about it ?
|
||||
}
|
||||
} else {
|
||||
die "File format error in file $fn2, line $ln: $line\n";
|
||||
}
|
||||
}
|
||||
|
||||
#report about extra tests in file1
|
||||
@remained_keys = keys %res1;
|
||||
if ($#remained_keys >= 0) {
|
||||
print OUT_TXT " : EXTRA (TESTS IN $fn1:)\n";
|
||||
foreach $key (@remained_keys) {
|
||||
print OUT_TXT "$line1{$key}\n";
|
||||
}
|
||||
}
|
||||
#report about extra tests in file2
|
||||
if ($j > 0) {
|
||||
print OUT_TXT " : EXTRA (TESTS IN $fn2:)\n";
|
||||
for($i=0; $i<$j; $i++) {
|
||||
print OUT_TXT "$new_in_2[$i]\n";
|
||||
}
|
||||
}
|
||||
if (<OUT_TXT>) {
|
||||
close OUT_TXT;
|
||||
$LOGTXT = "$out_fn".".txt";
|
||||
open(LOGHTML, ">$out_fn.html") || die "Can't open output file $out_fn.html: $!\n";
|
||||
constructHTML();
|
||||
close LOGHTML;
|
||||
} else {
|
||||
close OUT_TXT;
|
||||
print "Results are equivalent !\n";
|
||||
}
|
||||
close IN1;
|
||||
close IN2;
|
||||
}
|
||||
|
||||
##################################################################
|
||||
# main
|
||||
##################################################################
|
||||
|
@ -429,41 +534,59 @@ sub RunTestCaseUnix {
|
|||
title;
|
||||
|
||||
$curdir = cwd();
|
||||
$ret=`mkdir -p $curdir/log`;
|
||||
|
||||
# Prepare file names
|
||||
$x=`mkdir -p $curdir/log`;
|
||||
$LOGFILE = "$curdir/log/BWTestRun.log";
|
||||
$LOGTXT = "$curdir/log/BWTest.txt";
|
||||
$LOGHTML = "$curdir/log/BWTest.html";
|
||||
|
||||
if ($ARGV[0] =~ "genhtml") {
|
||||
open( LOGHTML, ">$LOGHTML" ) or die("Can't open HTML file $LOGHTML ($!)...\n");
|
||||
print("Generating result HTML page ...\n");
|
||||
constructHTML();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
# process command-line parameters
|
||||
# and check for valid usage
|
||||
|
||||
$testparam = "";
|
||||
$genparam = "";
|
||||
|
||||
if ( $#ARGV > 1 ) {
|
||||
usage;
|
||||
die;
|
||||
if ($ARGV[0] =~ /help/ || $ARGV[0] =~ /\?/) {
|
||||
usage();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if ( $#ARGV > 0 ) {
|
||||
if ($ARGV[0] =~ "-genhtml") {
|
||||
$genparam = $ARGV[1];
|
||||
if ($genparam eq "") {
|
||||
$genparam = "ALL";
|
||||
}
|
||||
|
||||
open( LOGHTML, ">$LOGHTML" ) or die("Can't open HTML file $LOGHTML ($!)...\n");
|
||||
print("Generating result HTML page ...\n");
|
||||
constructHTML();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if ($ARGV[0] eq "-compare") {
|
||||
compareResults($ARGV[1], $ARGV[2], $ARGV[3]);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if ( $#ARGV >= 0 ) {
|
||||
if ( $ARGV[0] != "-t" ) {
|
||||
usage;
|
||||
die;
|
||||
} else {
|
||||
} elsif ($ARGV[1] ne "") {
|
||||
$testparam = $ARGV[1];
|
||||
} else {
|
||||
usage();
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
## Default behaviour is to generate the HTML file
|
||||
if ($genparam eq "") {
|
||||
$genparam = "ALL";
|
||||
}
|
||||
|
||||
$mozhome = $ENV{"MOZILLA_FIVE_HOME"};
|
||||
|
||||
if ( $mozhome eq "" ) {
|
||||
|
@ -562,7 +685,7 @@ while (true) {
|
|||
|
||||
if (!$crashed) {
|
||||
if (!open (TEST_RES, "$mozhome/$TEST_RESULTS") || ($logstr = <TEST_RES>) =~ /^\s*$/) {
|
||||
$logstr = "$testcase: FAILED (Mozilla crashed)";
|
||||
$logstr = "$testcase: FAILED (undefined result)";
|
||||
}
|
||||
close TEST_RES;
|
||||
chomp $logstr;
|
||||
|
@ -582,6 +705,11 @@ constructLogFooter;
|
|||
|
||||
constructHTML();
|
||||
|
||||
if (-f "$curdir/log/BWTest.txt.bak") {
|
||||
print("Old result file found => generating diff files: \nTXT:->$curdir/log/diff.txt \nHTML:->$curdir/log/diff.html");
|
||||
compareResults();
|
||||
}
|
||||
|
||||
chdir($curdir);
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<html>
|
||||
<head>
|
||||
<script>
|
||||
function startOJITests() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
// var OJITestLoader = Components.classes["component://netscape/oji/test/api/loader"].createInstance();
|
||||
var OJITestLoader = Components.classes['@mozilla.org/oji/test/api/loader;1'].createInstance();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h2 align="center">OJI API tests starting page. </h2>
|
||||
Results of tests execution could be found on the console and
|
||||
in the appropriate output files.
|
||||
<script>
|
||||
startOJITests();
|
||||
</script>
|
||||
</body>
|
|
@ -27,6 +27,7 @@ CPP = \
|
|||
FindClass_5.cpp \
|
||||
FindClass_6.cpp \
|
||||
FindClass_7.cpp \
|
||||
FindClass_8.cpp \
|
||||
GetSuperclass_1.cpp \
|
||||
GetSuperclass_2.cpp \
|
||||
GetSuperclass_3.cpp \
|
||||
|
@ -45,6 +46,7 @@ OBJS = \
|
|||
$(OBJ_DIR)/FindClass_5.o \
|
||||
$(OBJ_DIR)/FindClass_6.o \
|
||||
$(OBJ_DIR)/FindClass_7.o \
|
||||
$(OBJ_DIR)/FindClass_8.o \
|
||||
$(OBJ_DIR)/GetSuperclass_1.o \
|
||||
$(OBJ_DIR)/GetSuperclass_2.o \
|
||||
$(OBJ_DIR)/GetSuperclass_3.o \
|
||||
|
|
|
@ -62,7 +62,7 @@ single_objdir:
|
|||
|
||||
$(TOP_DIR)/build/classes/test.jar: $(JAVA)
|
||||
@javac $? -d $(TOP_DIR)/build/classes
|
||||
@jar cvf $(TOP_DIR)/build/classes/test.jar $(TOP_DIR)/build/classes/*.class
|
||||
@cd $(TOP_DIR)/build/classes; jar cvf $(TOP_DIR)/build/classes/test.jar *.class; cd $(TOP_DIR)/build
|
||||
|
||||
classes: $(TOP_DIR)/build/classes/test.jar
|
||||
|
||||
|
@ -71,5 +71,5 @@ all: single_objdir $(DIRS) classes link
|
|||
$(DIRS)::
|
||||
@cd $@; \
|
||||
if test ! -f depend.mak; then >depend.mak; fi; \
|
||||
make make_depends; \
|
||||
make all;
|
||||
$(MAKE) make_depends; \
|
||||
$(MAKE) all;
|
||||
|
|
|
@ -63,7 +63,9 @@ single_objdir:
|
|||
$(TOP_DIR)/build/classes/test.jar: $(JAVA)
|
||||
@javac $? -d $(TOP_DIR)/build/classes
|
||||
# The current version of OJI plugin doesn't work with JAR archives
|
||||
@jar cvf $(TOP_DIR)/build/classes/test.jar $(TOP_DIR)/build/classes/*.class
|
||||
@cd $(TOP_DIR)/build/classes
|
||||
@jar cvf $(TOP_DIR)/build/classes/test.jar *.class
|
||||
@cd $(TOP_DIR)/build
|
||||
|
||||
|
||||
classes: $(TOP_DIR)/build/classes/test.jar
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
cl killer.cpp /link user32.lib
|
|
@ -0,0 +1,92 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun Microsystems,
|
||||
* Inc. Portions created by Sun are
|
||||
* Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************/
|
||||
/* This program is designed for Win32 platforms only */
|
||||
/* to close automatically */
|
||||
/* the dialog window appeared after Mozilla is crashed. */
|
||||
/* Otherwise application remains in memory until */
|
||||
/* this dialog is closed. */
|
||||
/* Though built version exist in the script directory one */
|
||||
/* may want to build it again. Then the following command */
|
||||
/* line should be used: */
|
||||
/* cl killer.cpp /link user32.lib */
|
||||
/**************************************************************/
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
//#define ERROR_DIALOG_TITLE "Mozilla: mozilla.exe - Application Error"
|
||||
#define ERROR_DIALOG_TITLE "Mozilla"
|
||||
//better to find in title some keywords than compare with the entire phrase
|
||||
#define ERROR_DIALOG_KW_1 "Mozilla"
|
||||
#define ERROR_DIALOG_KW_2 "Error"
|
||||
|
||||
#define OK_BUTTON_TITLE "close"
|
||||
//#define OK_BUTTON_TITLE "Ok"
|
||||
|
||||
BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM out) {
|
||||
char title[1024];
|
||||
GetWindowText(hwnd, title, 1024);
|
||||
//printf("Child Window: %x -> %s\n", hwnd, title);
|
||||
if (!strcmp(title, OK_BUTTON_TITLE)) {
|
||||
*((HWND*)out) = hwnd;
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK EnumWindowsProc( HWND hwnd, LPARAM lParam) {
|
||||
char title[1024];
|
||||
GetWindowText(hwnd, title, 1024);
|
||||
//printf("title: %s\n", title);
|
||||
if (strstr(title, ERROR_DIALOG_KW_1) || strstr(title, ERROR_DIALOG_KW_2)) {
|
||||
DWORD lp = 0, wp = 0;
|
||||
HWND ok;
|
||||
//really we can ommit this step but ...
|
||||
EnumChildWindows(hwnd, EnumChildProc, (LPARAM)(&ok));
|
||||
if (!ok) {
|
||||
printf("OK button not found !\n");
|
||||
return FALSE;
|
||||
}
|
||||
/*POINT p;
|
||||
p.x = 285; //experimental data -> but there are a lot of fonts in the world ...
|
||||
p.y = 150;
|
||||
HWND ok = ChildWindowFromPoint(hwnd, p);
|
||||
if (ok)
|
||||
printf("Child window: %x\n", ok);
|
||||
else
|
||||
printf("Child window not found !\n");*/
|
||||
lp = (unsigned long)ok;
|
||||
wp = 1;
|
||||
wp = wp | (BN_CLICKED << 16);
|
||||
//printf("COMMAND: %d (hwnd), %d (code), %d(id)\n", lp, HIWORD(wp), LOWORD(wp));
|
||||
SendMessage(hwnd, WM_COMMAND, wp, lp);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void main() {
|
||||
EnumWindows(EnumWindowsProc, 0);
|
||||
}
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
//mozilla specific headers
|
||||
#include "nspr.h"
|
||||
#include "nsString2.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#define OJI_TEST_RESULTS "OJITestResults.txt"
|
||||
#define OJI_TESTS_LIST "OJITests.lst"
|
||||
|
@ -109,7 +109,7 @@ public:
|
|||
static TestResult* PASS(char *comment) {
|
||||
char *msg = (char*)calloc(1, PL_strlen(comment)+1024);
|
||||
sprintf(msg, "Method %s", comment);
|
||||
CBufDescriptor *bufDescr = new CBufDescriptor(msg, PR_FALSE, PL_strlen(msg)+1, PL_strlen(msg));
|
||||
CBufDescriptor *bufDescr = new CBufDescriptor((const char*)msg, PR_FALSE, PL_strlen(msg)+1, PL_strlen(msg));
|
||||
nsString *str = new nsAutoString(*bufDescr);
|
||||
return new TestResult(PASS_value, *str);
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ public:
|
|||
static TestResult* FAIL(char *method, nsresult rc) {
|
||||
char *comment = (char*)calloc(1, PL_strlen(method)+1024);
|
||||
sprintf(comment, "Method %s returned %X", method, rc);
|
||||
CBufDescriptor *bufDescr = new CBufDescriptor(comment, PR_FALSE, PL_strlen(comment)+1, PL_strlen(comment));
|
||||
CBufDescriptor *bufDescr = new CBufDescriptor((const char*)comment, PR_FALSE, PL_strlen(comment)+1, PL_strlen(comment));
|
||||
nsString *str = new nsAutoString(*bufDescr);
|
||||
return new TestResult(FAIL_value, *str);
|
||||
}
|
||||
|
@ -129,13 +129,13 @@ public:
|
|||
static TestResult* FAIL(char *method, char* comment, nsresult rc) {
|
||||
char *outComment = (char*)calloc(1, PL_strlen(method)+1024);
|
||||
sprintf(outComment, "Method %s returned %X: %s", method, rc, comment);
|
||||
CBufDescriptor *bufDescr = new CBufDescriptor(comment, PR_FALSE, PL_strlen(comment)+1, PL_strlen(comment));
|
||||
CBufDescriptor *bufDescr = new CBufDescriptor((const char*)comment, PR_FALSE, PL_strlen(comment)+1, PL_strlen(comment));
|
||||
nsString *str = new nsAutoString(*bufDescr);
|
||||
return new TestResult(FAIL_value, *str);
|
||||
}
|
||||
|
||||
static TestResult* FAIL(char *comment) {
|
||||
CBufDescriptor *bufDescr = new CBufDescriptor(comment, PR_FALSE, PL_strlen(comment)+1, PL_strlen(comment));
|
||||
CBufDescriptor *bufDescr = new CBufDescriptor((const char*)comment, PR_FALSE, PL_strlen(comment)+1, PL_strlen(comment));
|
||||
nsString *str = new nsAutoString(*bufDescr);
|
||||
return new TestResult(FAIL_value, *str);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче