Add --build-debug options for run-tests.py script. (#4456)
This makes have option to running test262-es2015 and test262-esnext with debug version of jerryscript. On OSX, the $RUNNER -q --jerry-tests are in dead loop, disable it first. Increase TEST262_CASE_TIMEOUT to 180, so that --build-debug can pass the tests without timeout An side effect of this are ``` <test id="built-ins/decodeURIComponent/S15.1.3.2_A2.5_T1.js"><reason></reason></test> <test id="built-ins/decodeURI/S15.1.3.1_A2.5_T1.js"><reason></reason></test> ``` passed JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
This commit is contained in:
+18
-28
@@ -58,59 +58,44 @@ OPTIONS_DOCTESTS = ['--doctests=on', '--jerry-cmdline=off', '--error-messages=on
|
||||
JERRY_UNITTESTS_OPTIONS = [
|
||||
Options('unittests-es.next',
|
||||
OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ESNEXT),
|
||||
Options('unittests-es.next-debug',
|
||||
OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ESNEXT + OPTIONS_DEBUG),
|
||||
Options('doctests-es.next',
|
||||
OPTIONS_COMMON + OPTIONS_DOCTESTS + OPTIONS_PROFILE_ESNEXT),
|
||||
Options('doctests-es.next-debug',
|
||||
OPTIONS_COMMON + OPTIONS_DOCTESTS + OPTIONS_PROFILE_ESNEXT + OPTIONS_DEBUG),
|
||||
Options('unittests-es5.1',
|
||||
OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ES51),
|
||||
Options('unittests-es5.1-debug',
|
||||
OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG),
|
||||
Options('doctests-es5.1',
|
||||
OPTIONS_COMMON + OPTIONS_DOCTESTS + OPTIONS_PROFILE_ES51),
|
||||
Options('doctests-es5.1-debug',
|
||||
OPTIONS_COMMON + OPTIONS_DOCTESTS + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG),
|
||||
Options('unittests-es5.1-debug-init-fini',
|
||||
OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG
|
||||
Options('unittests-es5.1-init-fini',
|
||||
OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ES51
|
||||
+ ['--cmake-param=-DFEATURE_INIT_FINI=ON'],
|
||||
skip=skip_if((sys.platform == 'win32'), 'FEATURE_INIT_FINI build flag isn\'t supported on Windows,' +
|
||||
' because Microsoft Visual C/C++ Compiler doesn\'t support' +
|
||||
' library constructors and destructors.')),
|
||||
Options('unittests-es5.1-debug-math',
|
||||
OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG
|
||||
Options('unittests-es5.1-math',
|
||||
OPTIONS_COMMON + OPTIONS_UNITTESTS + OPTIONS_PROFILE_ES51
|
||||
+ ['--jerry-math=on']),
|
||||
]
|
||||
|
||||
# Test options for jerry-tests
|
||||
JERRY_TESTS_OPTIONS = [
|
||||
Options('jerry_tests-es.next-debug',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ESNEXT + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT
|
||||
Options('jerry_tests-es.next',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ESNEXT + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT
|
||||
+ OPTIONS_MEM_STRESS),
|
||||
Options('jerry_tests-es5.1',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT),
|
||||
Options('jerry_tests-es5.1-snapshot',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_SNAPSHOT + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT,
|
||||
['--snapshot']),
|
||||
Options('jerry_tests-es5.1-debug',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT
|
||||
+ OPTIONS_MEM_STRESS),
|
||||
Options('jerry_tests-es5.1-debug-snapshot',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_SNAPSHOT + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT
|
||||
+ OPTIONS_GC_MARK_LIMIT, ['--snapshot']),
|
||||
Options('jerry_tests-es5.1-debug-cpointer_32bit',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT
|
||||
Options('jerry_tests-es5.1-cpointer_32bit',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT
|
||||
+ ['--cpointer-32bit=on', '--mem-heap=1024']),
|
||||
Options('jerry_tests-es5.1-debug-external_context',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT
|
||||
Options('jerry_tests-es5.1-external_context',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT
|
||||
+ ['--external-context=on']),
|
||||
]
|
||||
|
||||
# Test options for test262
|
||||
TEST262_TEST_SUITE_OPTIONS = [
|
||||
Options('test262_tests', OPTIONS_PROFILE_ES51),
|
||||
Options('test262_tests-debug', OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG)
|
||||
]
|
||||
|
||||
# Test options for test262-es2015
|
||||
@@ -127,7 +112,7 @@ TEST262_ESNEXT_TEST_SUITE_OPTIONS = [
|
||||
# Test options for jerry-debugger
|
||||
DEBUGGER_TEST_OPTIONS = [
|
||||
Options('jerry_debugger_tests',
|
||||
OPTIONS_DEBUG + ['--jerry-debugger=on'])
|
||||
['--jerry-debugger=on'])
|
||||
]
|
||||
|
||||
# Test options for buildoption-test
|
||||
@@ -207,6 +192,8 @@ def get_arguments():
|
||||
help='Run license check')
|
||||
parser.add_argument('--check-magic-strings', action='store_true',
|
||||
help='Run "magic string source code generator should be executed" check')
|
||||
parser.add_argument('--build-debug', action='store_true',
|
||||
help='Build debug version jerryscript')
|
||||
parser.add_argument('--jerry-debugger', action='store_true',
|
||||
help='Run jerry-debugger tests')
|
||||
parser.add_argument('--jerry-tests', action='store_true',
|
||||
@@ -266,6 +253,10 @@ def report_skip(job):
|
||||
|
||||
def create_binary(job, options):
|
||||
build_args = job.build_args[:]
|
||||
build_dir_path = os.path.join(options.outdir, job.name)
|
||||
if options.build_debug:
|
||||
build_args.extend(OPTIONS_DEBUG)
|
||||
build_dir_path = os.path.join(options.outdir, job.name + '-debug')
|
||||
if options.buildoptions:
|
||||
for option in options.buildoptions.split(','):
|
||||
if option not in build_args:
|
||||
@@ -275,7 +266,6 @@ def create_binary(job, options):
|
||||
build_cmd.append(settings.BUILD_SCRIPT)
|
||||
build_cmd.extend(build_args)
|
||||
|
||||
build_dir_path = os.path.join(options.outdir, job.name)
|
||||
build_cmd.append('--builddir=%s' % build_dir_path)
|
||||
|
||||
install_dir_path = os.path.join(build_dir_path, 'local')
|
||||
@@ -472,7 +462,7 @@ def run_unittests(options):
|
||||
break
|
||||
|
||||
if sys.platform == 'win32':
|
||||
if "--debug" in job.build_args:
|
||||
if options.build_debug:
|
||||
build_config = "Debug"
|
||||
else:
|
||||
build_config = "MinSizeRel"
|
||||
|
||||
@@ -67,7 +67,7 @@ M_YAML_MULTILINE_LIST = re.compile(r"^ *- (.*)$")
|
||||
|
||||
|
||||
# The timeout of each test case
|
||||
TEST262_CASE_TIMEOUT = 5
|
||||
TEST262_CASE_TIMEOUT = 180
|
||||
|
||||
|
||||
def yaml_load(string):
|
||||
|
||||
Reference in New Issue
Block a user