From ccd51b5d26aafb45cd71de5ea61d228835bc1e92 Mon Sep 17 00:00:00 2001 From: "rpallath%eng.sun.com" Date: Tue, 27 Jun 2000 17:04:25 +0000 Subject: [PATCH] figure out platform and accordingly decide MOZILLA_EXECUTABLE git-svn-id: svn://10.0.0.236/branches/M15-OJI-05292000@73310 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/oji/tests/build/README | 75 +++++++-------------- mozilla/modules/oji/tests/script/autorun.pl | 21 +++--- 2 files changed, 38 insertions(+), 58 deletions(-) diff --git a/mozilla/modules/oji/tests/build/README b/mozilla/modules/oji/tests/build/README index 2806f133cf5..277ac5e30af 100755 --- a/mozilla/modules/oji/tests/build/README +++ b/mozilla/modules/oji/tests/build/README @@ -1,68 +1,43 @@ -====================== +============================ I. To build OJI API test: -====================== +============================ 1. set MOZILLA_HOME (top of Mozilla's tree) and JAVAHOME variables 2. goto build directory and say nmake -f Makefile.win -===================== +=========================== II. To run OJI API tests: -===================== +=========================== - 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 + 1. Add the following string into your mozProfile/prefs.js file user_pref("security.checkxpconnect", false); - 5. Update Path variable to include + 2. 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). - -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 - - -B. Slow mode (new Mozilla session for each test case): ------------------------------------------------------- - 7. Goto script directory and set correct parameters in the first few + 3. Delete component.reg file in Mozilla's bin directory + 4. Goto script directory and set correct parameters in the first few lines of autorun.pl file. - 8. Run perl script + $ADDITIONAL_PARAMETERS : Specify Profile name if other than default + (-P mozProfile). + + $DELAY_FACTOR : time in seconds after which the mozilla has + to be killed. It takes more time to load on + slower machine hence more time to execute the + test. By default it is set to 30secs. + 5. Add classes/test.jar to your CLASSPATH. + 6. Alter your Java Policy File, and add this entry. + grant { + permission java.security.AllPermission; + }; + (this is required so that native libraries can be loaded. Only used if + running JNIEnv Tests). + + 7. Run perl script perl autorun.pl - 9 See results of execution in the log directory. + 8. 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 -------- diff --git a/mozilla/modules/oji/tests/script/autorun.pl b/mozilla/modules/oji/tests/script/autorun.pl index 3f85cfc5b93..169704c0850 100755 --- a/mozilla/modules/oji/tests/script/autorun.pl +++ b/mozilla/modules/oji/tests/script/autorun.pl @@ -47,13 +47,23 @@ use File::Copy; # # ######################## -#Mozilla's executable - -$MOZILLA_EXECUTABLE="mozilla.exe"; #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"; +} + $FULL_TEST_LIST="OJITestsList.lst"; $TEST_RESULTS="OJITestResults.txt"; @@ -63,11 +73,6 @@ $TARGET_WINDOW="Test Descriptions"; $DEFAULT_TEST_URL="http://shiva:10001/oji"; -# 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; # time period in seconds of periodically checking: is the apprunner still alive $DELAY_OF_CYCLE = 1;