[test262] Use standalone Test262 harness project
TC-39 recently decided to remove the Python-based testing harness from the
Test262 project [1]. The code has been duplicated in a standalone project;
update V8's dependencies to fetch from that new location. This is based on
an earlier patch by Mike Pennisi.
[1] 2b9722db9b/es7/2016-05/may-25.md
BUG=v8:5078
Review-Url: https://codereview.chromium.org/2131743002
Cr-Commit-Position: refs/heads/master@{#37985}
This commit is contained in:
parent
54f663e2f2
commit
9f45c188dd
1
.gitignore
vendored
1
.gitignore
vendored
@ -59,6 +59,7 @@ shell_g
|
|||||||
/test/simdjs/data
|
/test/simdjs/data
|
||||||
/test/test262/data
|
/test/test262/data
|
||||||
/test/test262/data.tar
|
/test/test262/data.tar
|
||||||
|
/test/test262/harness
|
||||||
/testing/gmock
|
/testing/gmock
|
||||||
/testing/gtest
|
/testing/gtest
|
||||||
/third_party
|
/third_party
|
||||||
|
2
DEPS
2
DEPS
@ -34,6 +34,8 @@ deps = {
|
|||||||
"v8/test/simdjs/data": Var("git_url") + "/external/github.com/tc39/ecmascript_simd.git" + "@" + "baf493985cb9ea7cdbd0d68704860a8156de9556",
|
"v8/test/simdjs/data": Var("git_url") + "/external/github.com/tc39/ecmascript_simd.git" + "@" + "baf493985cb9ea7cdbd0d68704860a8156de9556",
|
||||||
"v8/test/test262/data":
|
"v8/test/test262/data":
|
||||||
Var("git_url") + "/external/github.com/tc39/test262.git" + "@" + "88bc7fe7586f161201c5f14f55c9c489f82b1b67",
|
Var("git_url") + "/external/github.com/tc39/test262.git" + "@" + "88bc7fe7586f161201c5f14f55c9c489f82b1b67",
|
||||||
|
"v8/test/test262/harness":
|
||||||
|
Var("git_url") + "/external/github.com/test262-utils/test262-harness-py.git" + "@" + "cbd968f54f7a95c6556d53ba852292a4c49d11d8",
|
||||||
"v8/tools/clang":
|
"v8/tools/clang":
|
||||||
Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "0b50729d487ec853d8f7c762c81cb2ad2785e674",
|
Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "0b50729d487ec853d8f7c762c81cb2ad2785e674",
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,8 @@ tarfile.grp = None
|
|||||||
tarfile.pwd = None
|
tarfile.pwd = None
|
||||||
|
|
||||||
def filter_git(tar_info):
|
def filter_git(tar_info):
|
||||||
if tar_info.name.startswith(os.path.join('data', '.git')):
|
if tar_info.name.startswith(os.path.join('data', '.git')) or \
|
||||||
|
tar_info.name.startswith(os.path.join('harness', '.git')):
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
tar_info.uname = tar_info.gname = "test262"
|
tar_info.uname = tar_info.gname = "test262"
|
||||||
@ -27,6 +28,7 @@ def filter_git(tar_info):
|
|||||||
|
|
||||||
with tarfile.open('data.tar', 'w') as tar:
|
with tarfile.open('data.tar', 'w') as tar:
|
||||||
tar.add('data', filter=filter_git)
|
tar.add('data', filter=filter_git)
|
||||||
|
tar.add('harness', filter=filter_git)
|
||||||
|
|
||||||
# Workaround for GN. We can't specify the tarfile as output because it's
|
# Workaround for GN. We can't specify the tarfile as output because it's
|
||||||
# not in the product directory. Therefore we track running of this script
|
# not in the product directory. Therefore we track running of this script
|
||||||
|
@ -5,10 +5,11 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import tarfile
|
import tarfile
|
||||||
|
from itertools import chain
|
||||||
|
|
||||||
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
for root, dirs, files in os.walk("data"):
|
for root, dirs, files in chain(os.walk("data"), os.walk("harness")):
|
||||||
dirs[:] = [d for d in dirs if not d.endswith('.git')]
|
dirs[:] = [d for d in dirs if not d.endswith('.git')]
|
||||||
for name in files:
|
for name in files:
|
||||||
# These names are for gyp, which expects slashes on all platforms.
|
# These names are for gyp, which expects slashes on all platforms.
|
||||||
|
@ -47,7 +47,10 @@ TEST_262_NATIVE_FILES = ["detachArrayBuffer.js"]
|
|||||||
|
|
||||||
TEST_262_SUITE_PATH = ["data", "test"]
|
TEST_262_SUITE_PATH = ["data", "test"]
|
||||||
TEST_262_HARNESS_PATH = ["data", "harness"]
|
TEST_262_HARNESS_PATH = ["data", "harness"]
|
||||||
TEST_262_TOOLS_PATH = ["data", "tools", "packaging"]
|
TEST_262_TOOLS_PATH = ["harness", "src"]
|
||||||
|
|
||||||
|
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)),
|
||||||
|
*TEST_262_TOOLS_PATH))
|
||||||
|
|
||||||
ALL_VARIANT_FLAGS_STRICT = dict(
|
ALL_VARIANT_FLAGS_STRICT = dict(
|
||||||
(v, [flags + ["--use-strict"] for flags in flag_sets])
|
(v, [flags + ["--use-strict"] for flags in flag_sets])
|
||||||
|
Loading…
Reference in New Issue
Block a user