From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- js/src/jit-test/README | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 js/src/jit-test/README (limited to 'js/src/jit-test/README') diff --git a/js/src/jit-test/README b/js/src/jit-test/README new file mode 100644 index 000000000..c3281c8d1 --- /dev/null +++ b/js/src/jit-test/README @@ -0,0 +1,80 @@ +JS Trace Test Suite + +* PURPOSE + +This is a test suite for testing TraceMonkey. All tests are run in the JS shell +with tracing enabled (-j). + +* REQUIREMENTS + +Python 2.5. This is already a standard requirement for building our tree. + +* RUNNING THE TESTS + +Basic usage: + + python jit_test.py + +The progress bar shows [#tests passed, #tests failed, #tests run] at the left. +If all tests pass, the output is 'PASSED ALL'. The test suite can be interrupted +at any time with Ctrl+C and partial results will be printed. + +To run only the basic tests, not including the slow tests: + + python jit_test.py basic + +For more options: + + python jit_test.py -h + +* CREATING NEW TESTS + +Simply create a JS file under the 'tests/' directory. Most tests should go in +'tests/basic/'. + +All tests are run with 'lib/prologue.js' included first on the command line. The +command line also creates a global variable 'libdir' that is set to the path +of the 'lib' directory. To include a file 'foo.js' from the lib directory in a +test case: + + load(libdir + 'foo.js') + +* TEST METALINES + +The first line of a test case can contain a special comment controlling how the +test is run. For example: + + // |jit-test| allow-oom; --no-threads + +The general format in EBNF is: + + metaline ::= cookie { item ";" } + cookie ::= "|jit-test|" + item ::= flag | attribute + + flag ::= "slow" | "allow-oom" | "valgrind" | "tz-pacific" | "debug" | + "--" switch + + attribute ::= name ":" value + name ::= "error" | "exitstatus" + value ::= + switch ::= + +The metaline may appear anywhere in the first line of the file: this allows it +to be placed inside any kind of comment. + +The meaning of the items: + + slow Test runs slowly. Do not run if the --no-slow option is given. + allow-oom If the test runs out of memory, it counts as passing. + valgrind Run test under valgrind. + tz-pacific Always run test with the Pacific time zone (TZ=PST8PDT). + + error The test should be considered to pass iff it throws the + given JS exception. + exitstatus The test should exit with the given status value (an integer). + + debug Run js with -d, whether --jitflags says to or not + --SWITCH Pass --SWITCH through to js + +* END -- cgit v1.2.3