Add --test262-esnext option to run-tests.py (#4027)
Changes: - Imported and unified test262 test harness for ES2015 and ESNext - Simplified runner scripts accordingly - Run tests on CI to be able detect regressions and progressions too JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
This commit is contained in:
committed by
GitHub
parent
26c1ffaf71
commit
40ad8c6e45
+16
-2
@@ -106,6 +106,11 @@ TEST262_ES2015_TEST_SUITE_OPTIONS = [
|
||||
Options('test262_tests_es2015', OPTIONS_PROFILE_ESNEXT + ['--line-info=on', '--error-messages=on']),
|
||||
]
|
||||
|
||||
# Test options for test262-esnext
|
||||
TEST262_ESNEXT_TEST_SUITE_OPTIONS = [
|
||||
Options('test262_tests_esnext', OPTIONS_PROFILE_ESNEXT + ['--line-info=on', '--error-messages=on']),
|
||||
]
|
||||
|
||||
# Test options for jerry-debugger
|
||||
DEBUGGER_TEST_OPTIONS = [
|
||||
Options('jerry_debugger_tests',
|
||||
@@ -200,6 +205,10 @@ def get_arguments():
|
||||
nargs='?', choices=['default', 'all', 'update'],
|
||||
help='Run test262 - ES2015. default: all tests except excludelist, ' +
|
||||
'all: all tests, update: all tests and update excludelist')
|
||||
parser.add_argument('--test262-esnext', default=False, const='default',
|
||||
nargs='?', choices=['default', 'all', 'update'],
|
||||
help='Run test262 - ESnext. default: all tests except excludelist, ' +
|
||||
'all: all tests, update: all tests and update excludelist')
|
||||
parser.add_argument('--unittests', action='store_true',
|
||||
help='Run unittests (including doctests)')
|
||||
parser.add_argument('--buildoption-test', action='store_true',
|
||||
@@ -401,6 +410,8 @@ def run_test262_test_suite(options):
|
||||
jobs.extend(TEST262_TEST_SUITE_OPTIONS)
|
||||
if options.test262_es2015:
|
||||
jobs.extend(TEST262_ES2015_TEST_SUITE_OPTIONS)
|
||||
if options.test262_esnext:
|
||||
jobs.extend(TEST262_ESNEXT_TEST_SUITE_OPTIONS)
|
||||
|
||||
for job in jobs:
|
||||
ret_build, build_dir_path = create_binary(job, options)
|
||||
@@ -414,9 +425,12 @@ def run_test262_test_suite(options):
|
||||
'--test-dir', settings.TEST262_TEST_SUITE_DIR
|
||||
]
|
||||
|
||||
if '--profile=es.next' in job.build_args:
|
||||
if job.name.endswith('es2015'):
|
||||
test_cmd.append('--es2015')
|
||||
test_cmd.append(options.test262_es2015)
|
||||
elif job.name.endswith('esnext'):
|
||||
test_cmd.append('--esnext')
|
||||
test_cmd.append(options.test262_esnext)
|
||||
else:
|
||||
test_cmd.append('--es51')
|
||||
|
||||
@@ -483,7 +497,7 @@ def main(options):
|
||||
Check(options.check_magic_strings, run_check, [settings.MAGIC_STRINGS_SCRIPT]),
|
||||
Check(options.jerry_debugger, run_jerry_debugger_tests, options),
|
||||
Check(options.jerry_tests, run_jerry_tests, options),
|
||||
Check(options.test262 or options.test262_es2015, run_test262_test_suite, options),
|
||||
Check(options.test262 or options.test262_es2015 or options.test262_esnext, run_test262_test_suite, options),
|
||||
Check(options.unittests, run_unittests, options),
|
||||
Check(options.buildoption_test, run_buildoption_test, options),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user