./gradlew test
Runs the MozillaSuiteTest (and the Test262Suite if installed) 3 times (at optimization levels -1, 0 and 9)
Results can be found in ./buildGradle/reports/tests/test/index.html
The Rhino test source contains logic to additionally run the official ECMAScript Test Suite. In order to do so, the test suite first needs to be fetched, by running the following commands:
git submodule init
git submodule update
After doing so, the ./gradlew test command will also execute all tests that are part of the official ECMAScript Test Suite
By default all tests are run 3 times, at optimization levels -1, 0 and 9.
This behavior can be changed through different means:
- Quick disable (will run tests with optimization level -1)
./gradlew test -Dquick
- Setting an explicit optimization level through the command line:
./gradlew test -DoptLevel=9
- Setting an explicit optimization level through the
TEST_262_OPTLEVELenvironment variable
./gradlew test --tests org.mozilla.javascript.tests.Test262SuiteTest
As Rhino isn't 100% compliant with the latest ECMAScript standard, there is a mechanism to define which tests to run/skip. The default is test262.properties.
Another .properties file to use can be specified using the test262properties commandline property
./gradlew test --tests org.mozilla.javascript.tests.Test262SuiteTest -Dtest262properties=testsrc/myOwn.properties