From 69566bd4d6887d1dd0e5438b02eff438a1da97c0 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 19 Apr 2020 17:33:18 +0200 Subject: [PATCH] LibJS: Allow passing "js" flags to run-tests This allows us to run "run-tests -g" for testing with GC after every heap allocation. This may flush out bugs that would otherwise not occur if GC'ing only occasionally. --- Libraries/LibJS/Tests/run-tests | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/LibJS/Tests/run-tests b/Libraries/LibJS/Tests/run-tests index 16146d3560..df55c56e3e 100755 --- a/Libraries/LibJS/Tests/run-tests +++ b/Libraries/LibJS/Tests/run-tests @@ -9,13 +9,15 @@ else export UBSAN_OPTIONS=print_stacktrace=1 fi +extra_args="$*" + pass_count=0 fail_count=0 count=0 GLOBIGNORE=test-common.js for f in *.js; do - result=`$js_program -t $f 2>/dev/null` + result=`$js_program $extra_args -t $f 2>/dev/null` if [ "$result" = "PASS" ]; then let pass_count++ echo -ne "( \033[32;1mPass\033[0m ) "