Add runtime option "--call-on-exit [FUNCNAME]" to main-unix.c (#3518)
With this option you can call a function after the user script and promises have ran, to be able to do assertions that are executed just before the process would exit. JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
committed by
Robert Fancsik
parent
4a331b2edc
commit
332e216736
@@ -127,7 +127,7 @@ def run_normal_tests(args, tests):
|
||||
test_cmd = get_platform_cmd_prefix()
|
||||
if args.runtime:
|
||||
test_cmd.append(args.runtime)
|
||||
test_cmd.append(args.engine)
|
||||
test_cmd.extend([args.engine, '--call-on-exit', '__checkAsync'])
|
||||
|
||||
total = len(tests)
|
||||
tested = 0
|
||||
@@ -161,6 +161,7 @@ def run_snapshot_tests(args, tests):
|
||||
generate_snapshot_cmd.append(args.runtime)
|
||||
|
||||
execute_snapshot_cmd.extend([args.engine, '--exec-snapshot', 'js.snapshot'])
|
||||
execute_snapshot_cmd.extend(['--call-on-exit', '__checkAsync'])
|
||||
|
||||
# engine: jerry[.exe] -> snapshot generator: jerry-snapshot[.exe]
|
||||
engine = os.path.splitext(args.engine)
|
||||
|
||||
Reference in New Issue
Block a user