summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262-update.py
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262-update.py')
-rwxr-xr-xjs/src/tests/test262-update.py43
1 files changed, 36 insertions, 7 deletions
diff --git a/js/src/tests/test262-update.py b/js/src/tests/test262-update.py
index d45d639ebb..deb4bdaaf4 100755
--- a/js/src/tests/test262-update.py
+++ b/js/src/tests/test262-update.py
@@ -25,6 +25,8 @@ UNSUPPORTED_FEATURES = set(
"legacy-regexp", # Bug 1306461
"regexp-duplicate-named-groups", # Bug 1773135
"set-methods", # Bug 1805038
+ "explicit-resource-management", # Bug 1569081
+ "regexp-modifiers",
]
)
FEATURE_CHECK_NEEDED = {
@@ -39,6 +41,7 @@ FEATURE_CHECK_NEEDED = {
"resizable-arraybuffer": "!ArrayBuffer.prototype.resize", # Bug 1670026
"uint8array-base64": "!Uint8Array.fromBase64", # Bug 1862220
"json-parse-with-source": "!JSON.hasOwnProperty('isRawJSON')", # Bug 1658310
+ "Float16Array": "!this.hasOwnProperty('Float16Array')",
}
RELEASE_OR_BETA = set(
[
@@ -54,6 +57,11 @@ SHELL_OPTIONS = {
"resizable-arraybuffer": "--enable-arraybuffer-resizable",
"uint8array-base64": "--enable-uint8array-base64",
"json-parse-with-source": "--enable-json-parse-with-source",
+ "Float16Array": "--enable-float16array",
+}
+
+INCLUDE_FEATURE_DETECTED_OPTIONAL_SHELL_OPTIONS = {
+ "testTypedArray.js": "Float16Array",
}
@@ -385,6 +393,19 @@ def convertTestFile(test262parser, testSource, testName, includeSet, strictTests
("shell-option({})".format(opt) for opt in sorted(shellOptions))
)
+ # Optional shell options. Some tests use feature detection for additional
+ # test coverage. We want to get this extra coverage without having to skip
+ # these tests in browser builds.
+ if "includes" in testRec:
+ optionalShellOptions = (
+ SHELL_OPTIONS[INCLUDE_FEATURE_DETECTED_OPTIONAL_SHELL_OPTIONS[include]]
+ for include in testRec["includes"]
+ if include in INCLUDE_FEATURE_DETECTED_OPTIONAL_SHELL_OPTIONS
+ )
+ refTestOptions.extend(
+ ("shell-option({})".format(opt) for opt in sorted(optionalShellOptions))
+ )
+
# Includes for every test file in a directory is collected in a single
# shell.js file per directory level. This is done to avoid adding all
# test harness files to the top level shell.js file.
@@ -552,7 +573,11 @@ def process_test262(test262Dir, test262OutDir, strictTests, externManifests):
convert = convertFixtureFile(testSource, testName)
else:
convert = convertTestFile(
- test262parser, testSource, testName, includeSet, strictTests
+ test262parser,
+ testSource,
+ testName,
+ includeSet,
+ strictTests,
)
for newFileName, newSource, externRefTest in convert:
@@ -587,7 +612,7 @@ def fetch_local_changes(inDir, outDir, srcDir, strictTests):
# TODO: fail if it's in the default branch? or require a branch name?
# Checks for unstaged or non committed files. A clean branch provides a clean status.
status = subprocess.check_output(
- ("git -C %s status --porcelain" % srcDir).split(" ")
+ ("git -C %s status --porcelain" % srcDir).split(" "), encoding="utf-8"
)
if status.strip():
@@ -598,31 +623,35 @@ def fetch_local_changes(inDir, outDir, srcDir, strictTests):
# Captures the branch name to be used on the output
branchName = subprocess.check_output(
- ("git -C %s rev-parse --abbrev-ref HEAD" % srcDir).split(" ")
+ ("git -C %s rev-parse --abbrev-ref HEAD" % srcDir).split(" "), encoding="utf-8"
).split("\n")[0]
# Fetches the file names to import
files = subprocess.check_output(
- ("git -C %s diff main --diff-filter=ACMR --name-only" % srcDir).split(" ")
+ ("git -C %s diff main --diff-filter=ACMR --name-only" % srcDir).split(" "),
+ encoding="utf-8",
)
# Fetches the deleted files to print an output log. This can be used to
# set up the skip list, if necessary.
deletedFiles = subprocess.check_output(
- ("git -C %s diff main --diff-filter=D --name-only" % srcDir).split(" ")
+ ("git -C %s diff main --diff-filter=D --name-only" % srcDir).split(" "),
+ encoding="utf-8",
)
# Fetches the modified files as well for logging to support maintenance
# in the skip list.
modifiedFiles = subprocess.check_output(
- ("git -C %s diff main --diff-filter=M --name-only" % srcDir).split(" ")
+ ("git -C %s diff main --diff-filter=M --name-only" % srcDir).split(" "),
+ encoding="utf-8",
)
# Fetches the renamed files for the same reason, this avoids duplicate
# tests if running the new local folder and the general imported Test262
# files.
renamedFiles = subprocess.check_output(
- ("git -C %s diff main --diff-filter=R --summary" % srcDir).split(" ")
+ ("git -C %s diff main --diff-filter=R --summary" % srcDir).split(" "),
+ encoding="utf-8",
)
# Print some friendly output