- Revision
- 107997
- Author
- msab...@apple.com
- Date
- 2012-02-16 16:46:38 -0800 (Thu, 16 Feb 2012)
Log Message
ENH: Add ability to run subset of _javascript_ layout tests with JSC
https://bugs.webkit.org/show_bug.cgi?id=78764
Reviewed by Gavin Barraclough.
Tools:
New simple test drive shell script that runs a defined
list of _javascript_ tests using jsc and the standalone-{pre,post}.js
wrappers.
* Scripts/run-fast-jsc: Added.
LayoutTests:
* fast/js/jsc-test-list: Added. List of tests that can be run
using jsc. Used by new Tools/Scripts/run-fast-jsc script.
* fast/js/resources/standalone-post.js: ~pdated to match changes
in js-test-post.js
* fast/js/resources/standalone-pre.js: Updated to match changes
in js-test-pre.js
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (107996 => 107997)
--- trunk/LayoutTests/ChangeLog 2012-02-17 00:28:33 UTC (rev 107996)
+++ trunk/LayoutTests/ChangeLog 2012-02-17 00:46:38 UTC (rev 107997)
@@ -1,3 +1,17 @@
+2012-02-16 Michael Saboff <msab...@apple.com>
+
+ ENH: Add ability to run subset of _javascript_ layout tests with JSC
+ https://bugs.webkit.org/show_bug.cgi?id=78764
+
+ Reviewed by Gavin Barraclough.
+
+ * fast/js/jsc-test-list: Added. List of tests that can be run
+ using jsc. Used by new Tools/Scripts/run-fast-jsc script.
+ * fast/js/resources/standalone-post.js: ~pdated to match changes
+ in js-test-post.js
+ * fast/js/resources/standalone-pre.js: Updated to match changes
+ in js-test-pre.js
+
2012-02-16 James Robinson <jam...@chromium.org>
[chromium] Unreviewed. Mark fast/js/stack.html as an expected failure, we aren't interesting in converging on
Added: trunk/LayoutTests/fast/js/jsc-test-list (0 => 107997)
--- trunk/LayoutTests/fast/js/jsc-test-list (rev 0)
+++ trunk/LayoutTests/fast/js/jsc-test-list 2012-02-17 00:46:38 UTC (rev 107997)
@@ -0,0 +1,280 @@
+fast/js/add-recovery
+fast/js/apply-varargs
+fast/js/arguments-bad-index
+fast/js/arguments
+fast/js/array-constructor-host-call
+fast/js/array-defineOwnProperty
+fast/js/array-enumerators-functions
+fast/js/array-every
+fast/js/array-filter
+fast/js/array-functions-non-arrays
+fast/js/array-holes
+fast/js/array-index-immediate-types
+fast/js/array-indexing
+fast/js/Array-isArray
+fast/js/array-iterate-backwards
+fast/js/array-lastIndexOf
+fast/js/array-proto-func-length-getter-except
+fast/js/array-proto-func-property-getter-except
+fast/js/array-reduce
+fast/js/array-reduceRight
+fast/js/array-reset-large-index
+fast/js/array-sort-numericCompare
+fast/js/array-sort-reentrance
+fast/js/array-splice
+fast/js/array-tostring-and-join
+fast/js/array-type-speculation
+fast/js/avl-crash
+fast/js/basic-strict-mode
+fast/js/bitops-type-tag
+fast/js/boolean-argument-prediction
+fast/js/boxed-double-to-int
+fast/js/break-ASI
+fast/js/call-apply-crash
+fast/js/caller-property
+fast/js/char-at
+fast/js/closure-inside-extra-arg-call
+fast/js/code-serialize-paren
+fast/js/codegen-assign-nontemporary-as-rexp
+fast/js/codegen-jless
+fast/js/codegen-loops-logical-nodes
+fast/js/codegen-peephole-locals
+fast/js/codegen-temporaries
+fast/js/comparefn-sort-stability
+fast/js/comparison-operators-greater
+fast/js/comparison-operators-less
+fast/js/comparison-operators
+fast/js/const-without-initializer
+fast/js/constant-count
+fast/js/constant-encoding
+fast/js/constant-folding
+fast/js/continue-break-multiple-labels
+fast/js/convert-nan-to-bool
+fast/js/cyclic-prototypes
+fast/js/date-constructor
+fast/js/date-daysfrom1970-overflow
+fast/js/date-DST-pre-1970
+fast/js/date-parse-comments-test
+fast/js/date-parse-test
+fast/js/date-proto-generic-invocation
+fast/js/date-set-to-nan
+fast/js/date-toisostring
+fast/js/date-utc-timeclip
+fast/js/debugger
+fast/js/declaration-in-block
+fast/js/delete-getters-setters
+fast/js/delete-then-put
+fast/js/dfg-array-length-dead
+fast/js/dfg-convert-this-dom-window
+fast/js/dfg-double-vote-fuzz
+fast/js/dfg-exception
+fast/js/dfg-get-by-val-clobber
+fast/js/dfg-get-by-val-getter-cse
+fast/js/dfg-getter-throw
+fast/js/dfg-getter
+fast/js/dfg-inline-arguments-int32
+fast/js/dfg-inline-arguments-simple
+fast/js/dfg-inline-arguments-use-directly-from-inlined-code
+fast/js/dfg-inline-arguments-use-from-all-the-places-broken
+fast/js/dfg-inline-arguments-use-from-all-the-places
+fast/js/dfg-inline-arguments-use-from-getter
+fast/js/dfg-inline-arguments-use-from-uninlined-code
+fast/js/dfg-inline-constant
+fast/js/dfg-inline-early-return
+fast/js/dfg-inline-function-dot-caller
+fast/js/dfg-inline-many-blocks
+fast/js/dfg-inline-new-array-buffer
+fast/js/dfg-inline-unused-this-method-check
+fast/js/dfg-inline-unused-this
+fast/js/dfg-inlining-reg-alloc
+fast/js/dfg-integer-optimization
+fast/js/dfg-intrinsic-osr-exit
+fast/js/dfg-intrinsic-unused-this-method-check
+fast/js/dfg-intrinsic-unused-this
+fast/js/dfg-min-max
+fast/js/dfg-multiply
+fast/js/dfg-other-branch
+fast/js/dfg-poison-fuzz
+fast/js/dfg-string-stricteq
+fast/js/dfg-uint32-to-number
+fast/js/dictionary-no-cache
+fast/js/dictionary-prototype-caching
+fast/js/do-while-semicolon
+fast/js/duplicate-param-crash
+fast/js/duplicate-param-gc-crash
+fast/js/equality
+fast/js/eval-cache-crash
+fast/js/eval-throw-return
+fast/js/eval-var-decl
+fast/js/exception-_expression_-offset
+fast/js/exception-for-nonobject
+fast/js/exception-linenums
+fast/js/exception-properties
+fast/js/exception-try-finally-scope-error
+fast/js/exception-with-handler-inside-eval-with-dynamic-scope
+fast/js/excessive-comma-usage
+fast/js/finally-codegen-failure
+fast/js/for-in-avoid-duplicates
+fast/js/for-in-cached
+fast/js/for-in-exeception
+fast/js/for-in-to-text
+fast/js/for-in-var-scope
+fast/js/function-apply-aliased
+fast/js/function-apply-many-args
+fast/js/function-apply
+fast/js/function-call-aliased
+fast/js/function-call-register-allocation
+fast/js/function-constructor-newline-after-brace
+fast/js/function-constructor-single-line-comment
+fast/js/function-declaration-statement
+fast/js/function-declaration
+fast/js/function-declarations-in-switch-statement
+fast/js/function-dot-apply-replace-base
+fast/js/function-dot-arguments
+fast/js/function-prototype-descriptor
+fast/js/function-toString-object-literals
+fast/js/function-toString-parentheses
+fast/js/function-toString-semicolon-insertion
+fast/js/getter-setter-gc
+fast/js/global-resolve-through-eval
+fast/js/gmail-re-re
+fast/js/has-own-property
+fast/js/ignored-result-null-comparison-crash
+fast/js/ignored-result-ref-crash
+fast/js/instance-of-immediates
+fast/js/instanceof-operator
+fast/js/integer-extremes
+fast/js/interpreter-no-activation
+fast/js/invalid-callframe-during-unwind
+fast/js/isPrototypeOf
+fast/js/js-continue-break-restrictions
+fast/js/JSON-parse-reviver
+fast/js/JSON-stringify-replacer
+fast/js/keywords-and-reserved_words
+fast/js/large-expressions
+fast/js/logical-or-jless
+fast/js/math-transforms
+fast/js/math
+fast/js/mod-by-zero
+fast/js/mod-crash
+fast/js/modify-non-references
+fast/js/multiline-comment-newline
+fast/js/named-function-_expression_
+fast/js/nested-functions
+fast/js/no-semi-insertion-at-end-of-script
+fast/js/number-cell-reuse
+fast/js/number-toExponential
+fast/js/number-toString
+fast/js/numeric-compare
+fast/js/numeric-conversion
+fast/js/numeric-escapes-in-string-literals
+fast/js/Object-create
+fast/js/Object-defineProperties
+fast/js/Object-defineProperty
+fast/js/Object-getOwnPropertyNames
+fast/js/Object-keys
+fast/js/object-literal-direct-put
+fast/js/object-literal-syntax
+fast/js/order-of-operations
+fast/js/parse-backslash-before-newline
+fast/js/parse-nan
+fast/js/parseFloat
+fast/js/parseInt
+fast/js/parser-high-byte-character
+fast/js/parser-syntax-check
+fast/js/parser-xml-close-comment
+fast/js/polymorphic-construct
+fast/js/pretty-print
+fast/js/preventExtensions
+fast/js/primitive-method-this
+fast/js/primitive-property-access-edge-cases
+fast/js/property-getters-and-setters
+fast/js/propertyIsEnumerable
+fast/js/prototypes
+fast/js/read-modify-eval
+fast/js/reentrant-caching
+fast/js/reentrant-call-unwind
+fast/js/regexp-alternatives
+fast/js/regexp-backreferences
+fast/js/regexp-char-insensitive
+fast/js/regexp-character-match-out-of-order
+fast/js/regexp-compile-crash
+fast/js/regexp-compile
+fast/js/regexp-divequal
+fast/js/regexp-extended-characters-match
+fast/js/regexp-extended-characters-more
+fast/js/regexp-find-first-asserted
+fast/js/regexp-in-and-foreach-handling
+fast/js/regexp-literals-arent-constants
+fast/js/regexp-many-brackets
+fast/js/regexp-negative-special-characters
+fast/js/regexp-no-extensions
+fast/js/regexp-non-bmp
+fast/js/regexp-non-character
+fast/js/regexp-norepeat
+fast/js/regexp-overflow-too-big
+fast/js/regexp-range-bound-ffff
+fast/js/regexp-zero-length-alternatives
+fast/js/registerCachingAcrossBranchTargets
+fast/js/rehash-assign
+fast/js/reparsing-semicolon-insertion
+fast/js/repeat-cached-vm-reentry
+fast/js/reserved-words-strict
+fast/js/reserved-words
+fast/js/resize-array-assign
+fast/js/slash-lineterminator-parse
+fast/js/sort-large-array
+fast/js/sort-no-jit-code-crash
+fast/js/sort-non-numbers
+fast/js/sort-randomly
+fast/js/sort-stability
+fast/js/sparse-array
+fast/js/stack-overflow-arrity-catch
+fast/js/stack-overflow-catch
+fast/js/stack-unwinding
+fast/js/statement-list-register-crash
+fast/js/static-scope-object
+fast/js/strict-callback-this
+fast/js/strict-throw-type-error
+fast/js/string-capitalization
+fast/js/string-from-char-code
+fast/js/string-index-overflow
+fast/js/string-property-deletion
+fast/js/string-property-iteration
+fast/js/string-slice-abnormal-values
+fast/js/string-sort
+fast/js/string-substr
+fast/js/string-trim
+fast/js/string_replace
+fast/js/this-non-object-proto
+fast/js/ToNumber
+fast/js/toString-elision-trailing-comma
+fast/js/tostring-exception-in-property-access
+fast/js/toString-for-var-decl
+fast/js/toString-number-dot-expr
+fast/js/toString-prefix-postfix-preserve-parens
+fast/js/toString-recursion
+fast/js/typeof-codegen-crash
+fast/js/typeof-constant-string
+fast/js/unexpected-constant-crash
+fast/js/unmatching-argument-count
+fast/js/var-shadows-arg-crash
+fast/js/var-shadows-arg-gc-crash
+fast/js/vardecl-blocks-init
+fast/regex/alternative-length-miscalculation
+fast/regex/assertion
+fast/regex/constructor
+fast/regex/dotstar
+fast/regex/early-acid3-86
+fast/regex/ecma-regex-examples
+fast/regex/invalid-range-in-class
+fast/regex/malformed-escapes
+fast/regex/non-capturing-backtracking
+fast/regex/overflow
+fast/regex/parentheses
+fast/regex/pcre-test-1
+fast/regex/pcre-test-4
+fast/regex/quantified-assertions
+fast/regex/repeat-match-waldemar
+fast/regex/slow
+fast/regex/toString
Modified: trunk/LayoutTests/fast/js/resources/standalone-post.js (107996 => 107997)
--- trunk/LayoutTests/fast/js/resources/standalone-post.js 2012-02-17 00:28:33 UTC (rev 107996)
+++ trunk/LayoutTests/fast/js/resources/standalone-post.js 2012-02-17 00:46:38 UTC (rev 107997)
@@ -1,2 +1,3 @@
-shouldBeTrue("successfullyParsed");
-debug("\nTEST COMPLETE\n");
+wasPostTestScriptParsed = true;
+
+finishJSTest();
Modified: trunk/LayoutTests/fast/js/resources/standalone-pre.js (107996 => 107997)
--- trunk/LayoutTests/fast/js/resources/standalone-pre.js 2012-02-17 00:28:33 UTC (rev 107996)
+++ trunk/LayoutTests/fast/js/resources/standalone-pre.js 2012-02-17 00:46:38 UTC (rev 107997)
@@ -1,3 +1,6 @@
+var wasPostTestScriptParsed = false;
+var errorMessage;
+
function description(msg)
{
print(msg);
@@ -22,6 +25,7 @@
function testFailed(msg)
{
+ errorMessage = msg;
print("FAIL", escapeString(msg));
}
@@ -141,3 +145,22 @@
else
testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception" : _ev) + ". Was " + _av + ".");
}
+
+function isSuccessfullyParsed()
+{
+ // FIXME: Remove this and only report unexpected syntax errors.
+ if (!errorMessage)
+ successfullyParsed = true;
+ shouldBeTrue("successfullyParsed");
+ debug("\nTEST COMPLETE\n");
+}
+
+// It's possible for an async test to call finishJSTest() before js-test-post.js
+// has been parsed.
+function finishJSTest()
+{
+ wasFinishJSTestCalled = true;
+ if (!wasPostTestScriptParsed)
+ return;
+ isSuccessfullyParsed();
+}
Modified: trunk/Tools/ChangeLog (107996 => 107997)
--- trunk/Tools/ChangeLog 2012-02-17 00:28:33 UTC (rev 107996)
+++ trunk/Tools/ChangeLog 2012-02-17 00:46:38 UTC (rev 107997)
@@ -1,3 +1,16 @@
+2012-02-16 Michael Saboff <msab...@apple.com>
+
+ ENH: Add ability to run subset of _javascript_ layout tests with JSC
+ https://bugs.webkit.org/show_bug.cgi?id=78764
+
+ Reviewed by Gavin Barraclough.
+
+ New simple test drive shell script that runs a defined
+ list of _javascript_ tests using jsc and the standalone-{pre,post}.js
+ wrappers.
+
+ * Scripts/run-fast-jsc: Added.
+
2012-02-16 Csaba Osztrogonác <o...@webkit.org>
Add new Qt performance tester bot to build.webkit.org
Added: trunk/Tools/Scripts/run-fast-jsc (0 => 107997)
--- trunk/Tools/Scripts/run-fast-jsc (rev 0)
+++ trunk/Tools/Scripts/run-fast-jsc 2012-02-17 00:46:38 UTC (rev 107997)
@@ -0,0 +1,159 @@
+#! /bin/sh
+
+# Copyright (C) 2012 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script to run selected LayoutTests/fast/{js,regex} tests using jsc
+
+jscCmd="/System/Library/Frameworks/_javascript_Core.framework/Resources/jsc"
+testRoot=/tmp/LayoutTests
+resultsRoot=`date \+/tmp/results-%Y-%m-%d-%H-%M-%S`
+testList="unset"
+
+cmdName=`basename $0`
+
+function usage()
+{
+ echo "usage: $cmdName [[--jsc | -j] <path-to-jsc>] [[--results-dir | -r] <results-path>]"
+ echo " [[--test-root | -t] <test-root-path>] [[--test-list | -l] <test-list-file>]"
+ exit 1
+}
+
+while [ $# -gt 1 ]
+do
+ case $1 in
+ --jsc|-j)
+ jscCmd=$2
+ ;;
+ --results-dir|-r)
+ resultsRoot=$2
+ ;;
+ --test-root|-t)
+ testRoot=$2
+ ;;
+ --test-list|-l)
+ testList=$2
+ ;;
+ *)
+ echo "Unrecognized option \"$1\""
+ usage
+ ;;
+ esac
+
+ shift 2
+done
+
+if [ $# -gt 0 ]
+then
+ echo "Extra argument \"$1\""
+ usage
+fi
+
+if [ $testList = "unset" ]
+then
+ testList=$testRoot/fast/js/jsc-test-list
+fi
+
+preScript=$testRoot/fast/js/resources/standalone-pre.js
+postScript=$testRoot/fast/js/resources/standalone-post.js
+passList=$resultsRoot/passed
+failList=$resultsRoot/failed
+crashList=$resultsRoot/crashed
+
+numTestsRun=0
+numPassed=0
+numFailed=0
+numCrashed=0
+
+rm -rf $resultsRoot
+rm -f jsc-tests-passed jsc-tests-failed
+
+for test in `cat $testList`
+do
+ testPassed=0
+ testCrashed=0
+ testName=`basename $test`
+ dirName=`dirname $test`
+
+ expectedOut="$testRoot/$dirName/${testName}-expected.txt"
+ actualOut="$resultsRoot/$dirName/${testName}-out.txt"
+ actualErr="$resultsRoot/$dirName/${testName}-err.txt"
+ diffOut="$resultsRoot/$dirName/${testName}-diff.txt"
+ jsTest="$testRoot/$dirName/script-tests/${testName}.js"
+
+ if [ ! -d "$resultsRoot/$dirName" ]
+ then
+ mkdir -p "$resultsRoot/$dirName"
+ fi
+
+ if [ -f $expectedOut -a -f $jsTest ]
+ then
+ echo "Testing $test ... \c"
+ let numTestsRun=$numTestsRun+1
+ $jscCmd $preScript $jsTest $postScript 2>$actualErr > $actualOut
+ JSC_RES=$?
+
+ if [ $JSC_RES -eq 0 ]
+ then
+ diff $actualOut $expectedOut > $diffOut
+ if [ $? -eq 0 ]
+ then
+ testPassed=1
+ echo "PASSED"
+ else
+ testPassed=0
+ echo "FAILED"
+ fi
+ else
+ testPassed=0
+ if [ $JSC_RES -gt 128 ]
+ then
+ testCrashed=1
+ echo "CRASHED"
+ fi
+ fi
+
+ if [ $testPassed -eq 1 ]
+ then
+ echo "$test" >> $passList
+ let numPassed=$numPassed+1
+ else
+ echo "$test" >> $failList
+ let numFailed=$numFailed+1
+ if [ $testCrashed -eq 1 ]
+ then
+ echo "$test" >> $crashList
+ let numCrashed=$numCrashed+1
+ fi
+ fi
+ fi
+done
+
+if [ $numPassed -eq $numTestsRun ]
+then
+ echo "All $numTestsRun tests passed!" | tee $resultsRoot/summary
+else
+ echo "$numPassed tests passed, $numFailed tests failed, $numCrashed tests crashed." | tee $resultsRoot/summary
+fi
+
+echo "Test results in $resultsRoot"
Property changes on: trunk/Tools/Scripts/run-fast-jsc
___________________________________________________________________
Added: svn:executable