From 6af25acfae4d8009b1627a5d917f9c0ca1ec403c Mon Sep 17 00:00:00 2001 From: "rpallath%eng.sun.com" Date: Fri, 3 Nov 2000 20:05:16 +0000 Subject: [PATCH] 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) --- modules/oji/tests/FAQ | 326 ++++++++++ modules/oji/tests/README | 168 ++++++ modules/oji/tests/build/Makefile | 9 +- modules/oji/tests/build/Makefile.win | 6 + modules/oji/tests/build/README | 262 ++++---- modules/oji/tests/build/compile.mk | 3 + modules/oji/tests/build/rules.mk | 10 +- modules/oji/tests/build/test.html | 4 +- modules/oji/tests/script/OJIValidTests.lst | 558 ++++++++++++++++++ modules/oji/tests/script/autorun.pl | 212 +++++-- modules/oji/tests/script/test.html | 18 + .../oji/tests/src/JNI/ClassOperation/Makefile | 2 + modules/oji/tests/src/JNI/Makefile | 6 +- modules/oji/tests/src/JNI/Makefile.win | 4 +- modules/oji/tests/src/Killer/kill.bat | 1 + modules/oji/tests/src/Killer/killer.cpp.win98 | 92 +++ modules/oji/tests/src/include/ojiapitests.h | 10 +- 17 files changed, 1517 insertions(+), 174 deletions(-) create mode 100644 modules/oji/tests/FAQ create mode 100755 modules/oji/tests/README create mode 100644 modules/oji/tests/script/OJIValidTests.lst create mode 100755 modules/oji/tests/script/test.html create mode 100755 modules/oji/tests/src/Killer/kill.bat create mode 100755 modules/oji/tests/src/Killer/killer.cpp.win98 diff --git a/modules/oji/tests/FAQ b/modules/oji/tests/FAQ new file mode 100644 index 000000000000..9bc122dba603 --- /dev/null +++ b/modules/oji/tests/FAQ @@ -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 /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 /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 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 :${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 /.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 /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 /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 /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:/modules/oji/tests/build/classes + + where is absolute path to mozilla dir. + ( e.g: -Xbootclasspath/a:c:\mozilla\modules\oji\tests\build\classes ) + + Press 'Apply' + Go to to your /.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 _.log + + To find out which is the most recent log, check by time stamp + (ls -lt _*.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. + + + + +=========================================================================== diff --git a/modules/oji/tests/README b/modules/oji/tests/README new file mode 100755 index 000000000000..b53411c456f0 --- /dev/null +++ b/modules/oji/tests/README @@ -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 /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 /Program Files/Users50//prefs.js to add line + user_pref("signed.applets.codebase_principal_support",true); + where 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:///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: + where is \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 /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 /.mozilla//prefs.js to add line + user_pref("signed.applets.codebase_principal_support",true); + where 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:///modules/oji/tests/script) + 4. Delete component.reg file in Mozilla's bin directory. + 5. Invoke /jre/bin/ControlPanel + 6. In RunTime Parameter Text Field add the following line + -Xbootclasspath/a: + where is /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. diff --git a/modules/oji/tests/build/Makefile b/modules/oji/tests/build/Makefile index 46bb2b9395ff..f9dcc481b8e4 100755 --- a/modules/oji/tests/build/Makefile +++ b/modules/oji/tests/build/Makefile @@ -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 \ diff --git a/modules/oji/tests/build/Makefile.win b/modules/oji/tests/build/Makefile.win index 9a6ffa5d00d7..33ea4c4ce0db 100755 --- a/modules/oji/tests/build/Makefile.win +++ b/modules/oji/tests/build/Makefile.win @@ -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 diff --git a/modules/oji/tests/build/README b/modules/oji/tests/build/README index 2806f133cf59..b53411c456f0 100755 --- a/modules/oji/tests/build/README +++ b/modules/oji/tests/build/README @@ -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 - nmake -f Makefile.win + 2. set MOZILLA_FIVE_HOME to /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. + + 1. Update /Program Files/Users50//prefs.js to add line + user_pref("signed.applets.codebase_principal_support",true); + where 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:///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: + where is \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 -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 - perl autorun.pl - 9 See results of execution in the log directory. - - -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 - gmake + 2. set MOZILLA_FIVE_HOME to /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 /.mozilla//prefs.js to add line + user_pref("signed.applets.codebase_principal_support",true); + where 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:///modules/oji/tests/script) + 4. Delete component.reg file in Mozilla's bin directory. + 5. Invoke /jre/bin/ControlPanel + 6. In RunTime Parameter Text Field add the following line + -Xbootclasspath/a: + where is /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). -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 - perl autorun.pl - 9 See results of execution in the log directory. +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 into your CLASSPATH - - -==================== -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. diff --git a/modules/oji/tests/build/compile.mk b/modules/oji/tests/build/compile.mk index 2b7a6f82a50c..b72ecc3295ed 100755 --- a/modules/oji/tests/build/compile.mk +++ b/modules/oji/tests/build/compile.mk @@ -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) diff --git a/modules/oji/tests/build/rules.mk b/modules/oji/tests/build/rules.mk index 4a0fa83d2bc6..aecce36d9089 100755 --- a/modules/oji/tests/build/rules.mk +++ b/modules/oji/tests/build/rules.mk @@ -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/. diff --git a/modules/oji/tests/build/test.html b/modules/oji/tests/build/test.html index c6ad3336f9ee..8f2a0f8ce666 100755 --- a/modules/oji/tests/build/test.html +++ b/modules/oji/tests/build/test.html @@ -2,7 +2,9 @@ diff --git a/modules/oji/tests/script/OJIValidTests.lst b/modules/oji/tests/script/OJIValidTests.lst new file mode 100644 index 000000000000..1a47ed053ba5 --- /dev/null +++ b/modules/oji/tests/script/OJIValidTests.lst @@ -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 diff --git a/modules/oji/tests/script/autorun.pl b/modules/oji/tests/script/autorun.pl index 169704c0850d..7dc8964e5962 100755 --- a/modules/oji/tests/script/autorun.pl +++ b/modules/oji/tests/script/autorun.pl @@ -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 ]\n"; + print " perl autorun.pl [ -help ] [ -genhtml [ ALL/PASS/FAILED/ ] ] [ -compare [ ] ] [ -t ]\n"; print "\n"; - print " where is one of the test cases\n"; - print " name ex: JVMManager_CreateProxyJNI_1\n"; + print " -help This message.\n\n"; + print " -compare \n"; + print " Compares two test result files and generates the diff files\n"; + print " the resulting diff files in text (.txt)\n"; + print " and HTML (.html) formats\n"; + print " 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 " => log/BWTest.txt \n"; + print " => log/BWTest.txt.bak \n\n"; + print " -genhtml