Commit 01cc4f9f authored by littledan's avatar littledan Committed by Commit bot

test262 roll

A couple infrastructure changes went into this patch:
- test262 changed from expecting $ to $262
- upstream-local-tests.sh gets a command-line parameter for ease of use
- Fixed up the FAIL_SLOPPY infrastructure, which seems to have bit-rotted
- Inserted a terrible hack to get around test262 tests with a $ in the name

Drive-by fix for the length of Intl.DateTimeFormat.prototype.format

R=adamk

Review-Url: https://codereview.chromium.org/2733843002
Cr-Commit-Position: refs/heads/master@{#43749}
parent 8e4be1a2
......@@ -34,7 +34,7 @@ deps = {
"v8/test/mozilla/data":
Var("chromium_url") + "/v8/deps/third_party/mozilla-tests.git" + "@" + "f6c578a10ea707b1a8ab0b88943fe5115ce2b9be",
"v8/test/test262/data":
Var("chromium_url") + "/external/github.com/tc39/test262.git" + "@" + "a72ee6d91275aa6524e84a9b7070103411ef2689",
Var("chromium_url") + "/external/github.com/tc39/test262.git" + "@" + "975e54de17ede3d8802dd7411181dbbc29147308",
"v8/test/test262/harness":
Var("chromium_url") + "/external/github.com/test262-utils/test262-harness-py.git" + "@" + "0f2acdd882c84cff43b9d60df7574a1901e2cdcd",
"v8/tools/clang":
......
......@@ -1751,8 +1751,8 @@ function FormatDateToParts(dateValue) {
%FunctionSetLength(FormatDateToParts, 0);
// 0 because date is optional argument.
AddBoundMethod(GlobalIntlDateTimeFormat, 'format', formatDate, 0, 'dateformat',
// Length is 1 as specified in ECMA 402 v2+
AddBoundMethod(GlobalIntlDateTimeFormat, 'format', formatDate, 1, 'dateformat',
true);
......
......@@ -6,4 +6,4 @@ function $DETACHBUFFER(buffer) {
%ArrayBufferNeuter(buffer);
}
$.detachArrayBuffer = $DETACHBUFFER;
$262.detachArrayBuffer = $DETACHBUFFER;
......@@ -91,7 +91,7 @@ function $DONE(arg){
};
function RealmOperators(realm) {
let $ = {
let $262 = {
evalScript(script) {
return Realm.eval(realm, script);
},
......@@ -100,8 +100,8 @@ function RealmOperators(realm) {
},
global: Realm.eval(realm, 'this')
};
$.global.$ = $;
return $;
$262.global.$262 = $262;
return $262;
}
var $ = RealmOperators(Realm.current());
var $262 = RealmOperators(Realm.current());
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
$.agent = (function () {
$262.agent = (function () {
var workers = [];
var i32a = null;
......@@ -48,7 +48,7 @@ function workerScript(script) {
}
};
var $ = {
var $262 = {
agent: {
receiveBroadcast(receiver) {
pendingReceiver = receiver;
......
......@@ -18,4 +18,9 @@ for root, dirs, files in chain(os.walk("data"), os.walk("harness")):
# For gyp, quote the name in case it includes spaces
if len(sys.argv) > 1 and sys.argv[1] == '--quoted':
pathname = '"' + pathname + '"'
# Temporary hack until we upgrade to gn swarming:
# gyp doesn't handle files containing $ in the name very well, so we just
# exclude them from the 'sources' list and hope that other changes cause
# the archive to be rebuilt.
if '$' in pathname: continue
print(pathname)
......@@ -44,6 +44,7 @@
'language/expressions/compound-assignment/S11.13.2_A7.7_T4': [FAIL],
'language/expressions/compound-assignment/S11.13.2_A7.8_T4': [FAIL],
'language/expressions/compound-assignment/S11.13.2_A7.9_T4': [FAIL],
'language/statements/with/unscopables-inc-dec': [FAIL],
# https://code.google.com/p/v8/issues/detail?id=4249
'language/expressions/assignment/S11.13.1_A7_T1': [FAIL],
......@@ -86,13 +87,6 @@
# https://code.google.com/p/v8/issues/detail?id=4253
'language/asi/S7.9_A5.7_T1': [PASS, FAIL_OK],
###### BEGIN REGEXP SUBCLASSING SECTION ######
# https://bugs.chromium.org/p/v8/issues/detail?id=5949
'built-ins/RegExp/prototype/exec/failure-lastindex-no-access': [FAIL],
'built-ins/RegExp/prototype/exec/success-lastindex-no-access': [FAIL],
###### END REGEXP SUBCLASSING SECTION ######
# https://bugs.chromium.org/p/v8/issues/detail?id=4895
'built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer': [FAIL],
'built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer-realm': [FAIL],
......@@ -275,10 +269,6 @@
'built-ins/Function/prototype/toString/setter-object': ['--harmony-function-tostring'],
'built-ins/Function/prototype/toString/unicode': ['--harmony-function-tostring'],
# https://bugs.chromium.org/p/v8/issues/detail?id=5115
'language/statements/class/subclass/class-definition-null-proto-missing-return-override': [FAIL],
'language/statements/class/subclass/class-definition-null-proto-this': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=5116
'built-ins/Object/internals/DefineOwnProperty/nan-equivalence': [PASS, FAIL],
'built-ins/TypedArray/prototype/fill/fill-values-conversion-operations-consistent-nan': [PASS, FAIL],
......@@ -430,10 +420,13 @@
# https://bugs.chromium.org/p/v8/issues/detail?id=5855
'language/expressions/async-generators/*': [SKIP],
'language/statements/async-generator/*': [SKIP],
# SharedArrayBuffer tests that require flags
'built-ins/SharedArrayBuffer/*': ['--harmony-sharedarraybuffer'],
'built-ins/Atomics/*': ['--harmony-sharedarraybuffer'],
'built-ins/ArrayBuffer/prototype/byteLength/this-is-sharedarraybuffer': ['--harmony-sharedarraybuffer'],
'built-ins/ArrayBuffer/prototype/slice/this-is-sharedarraybuffer': ['--harmony-sharedarraybuffer'],
'built-ins/DataView/buffer-does-not-have-arraybuffer-data-throws-sab': ['--harmony-sharedarraybuffer'],
'built-ins/DataView/buffer-reference-sab': ['--harmony-sharedarraybuffer'],
'built-ins/DataView/byteoffset-is-negative-throws-sab': ['--harmony-sharedarraybuffer'],
......@@ -474,6 +467,7 @@
'built-ins/DataView/toindex-bytelength-sab': ['--harmony-sharedarraybuffer'],
'built-ins/DataView/toindex-byteoffset-sab': ['--harmony-sharedarraybuffer'],
'built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type-conversions-sab': ['--harmony-sharedarraybuffer'],
'built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type-sab': ['--harmony-sharedarraybuffer'],
'built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type-sab': ['--harmony-sharedarraybuffer'],
'built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type-sab': ['--harmony-sharedarraybuffer'],
'built-ins/TypedArrays/buffer-arg-bufferbyteoffset-throws-from-modulo-element-size-sab': ['--harmony-sharedarraybuffer'],
......@@ -498,12 +492,22 @@
'built-ins/TypedArrays/buffer-arg-returns-new-instance-sab': ['--harmony-sharedarraybuffer'],
'built-ins/TypedArrays/buffer-arg-toindex-bytelength-sab': ['--harmony-sharedarraybuffer'],
'built-ins/TypedArrays/buffer-arg-toindex-byteoffset-sab': ['--harmony-sharedarraybuffer'],
'built-ins/TypedArrays/buffer-arg-typedarray-backed-by-sharedarraybuffer': ['--harmony-sharedarraybuffer'],
'built-ins/TypedArrays/buffer-arg-use-custom-proto-if-object-sab': ['--harmony-sharedarraybuffer'],
'built-ins/TypedArrays/buffer-arg-use-default-proto-if-custom-proto-is-not-object-sab': ['--harmony-sharedarraybuffer'],
'built-ins/TypedArrays/internals/Get/indexed-value-sab': ['--harmony-sharedarraybuffer'],
'built-ins/ArrayBuffer/prototype/byteLength/this-is-sharedarraybuffer': ['--harmony-sharedarraybuffer'],
'built-ins/ArrayBuffer/prototype/slice/this-is-sharedarraybuffer': ['--harmony-sharedarraybuffer'],
'built-ins/TypedArrays/buffer-arg-typedarray-backed-by-sharedarraybuffer': ['--harmony-sharedarraybuffer'],
# https://bugs.chromium.org/p/v8/issues/detail?id=5961
'built-ins/Atomics/add/good-views': ['--harmony-sharedarraybuffer', FAIL],
'built-ins/Atomics/and/good-views': ['--harmony-sharedarraybuffer', FAIL],
'built-ins/Atomics/compareExchange/good-views': ['--harmony-sharedarraybuffer', FAIL],
'built-ins/Atomics/exchange/good-views': ['--harmony-sharedarraybuffer', FAIL],
'built-ins/Atomics/load/good-views': ['--harmony-sharedarraybuffer', FAIL],
'built-ins/Atomics/or/good-views': ['--harmony-sharedarraybuffer', FAIL],
'built-ins/Atomics/store/good-views': ['--harmony-sharedarraybuffer', FAIL],
'built-ins/Atomics/sub/good-views': ['--harmony-sharedarraybuffer', FAIL],
'built-ins/Atomics/wake/good-views': ['--harmony-sharedarraybuffer', FAIL],
'built-ins/Atomics/xor/good-views': ['--harmony-sharedarraybuffer', FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=5983
'built-ins/SharedArrayBuffer/newtarget-prototype-is-not-object': [FAIL],
......@@ -511,12 +515,17 @@
# https://bugs.chromium.org/p/v8/issues/detail?id=5984
'built-ins/SharedArrayBuffer/proto-from-ctor-realm': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=5982
'built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type-sab': ['--harmony-sharedarraybuffer', FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=5897
'built-ins/SharedArrayBuffer/prototype/slice/*': [SKIP],
# https://bugs.chromium.org/p/v8/issues/detail?id=6045
'intl402/NumberFormat/prototype/format/11.3.2_TRF': [FAIL],
'intl402/NumberFormat/prototype/format/11.3.2_TRP': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=6049
'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-caller': [FAIL_SLOPPY],
'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-arguments': [FAIL_SLOPPY],
######################## NEEDS INVESTIGATION ###########################
# These test failures are specific to the intl402 suite and need investigation
......@@ -588,12 +597,6 @@
'built-ins/Date/prototype/setFullYear/new-value-time-clip': [PASS, FAIL],
'built-ins/Date/prototype/setMonth/new-value-time-clip': [PASS, FAIL],
# v8:5486
# Spec changed to be more permissive, tests need to be updated.
'language/module-code/instn-iee-star-cycle': [FAIL],
'language/module-code/instn-named-star-cycle': [FAIL],
'language/module-code/instn-star-star-cycle': [FAIL],
# Symbol.iterator on namespace objects was removed, tests need to be updated.
'language/module-code/namespace/Symbol.iterator/*': [SKIP],
'language/module-code/namespace/internals/get-own-property-sym': [SKIP],
......
......@@ -232,7 +232,8 @@ class Test262TestSuite(testsuite.TestSuite):
"--use-strict" not in testcase.flags):
return outcome != statusfile.FAIL
return not outcome in ([outcome for outcome in testcase.outcomes
if not outcome.startswith('--')]
if not outcome.startswith('--')
and outcome != statusfile.FAIL_SLOPPY]
or [statusfile.PASS])
def PrepareSources(self):
......
......@@ -9,7 +9,7 @@
# This patch could then hopefully be used for upstreaming tests.
# The script should be run from the top level directory of the V8 checkout.
git show | grep '+++ b/test/test262/local-tests' | while read test; do
git show $1 | grep '+++ b/test/test262/local-tests' | while read test; do
path=${test:6}
datapath=${path/local-tests/data}
echo cp $path $datapath
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment