diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-30 22:13:13 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-30 23:00:35 +0200 |
commit | 29ab51800320aab315ed405b223a905fa05756d9 (patch) | |
tree | 00511588a116d0fc17a5b6a9bcad5ae85390ff77 /Libraries/LibJS | |
parent | 165f69023b73898e424949a8c6a2a9de86077cfd (diff) | |
download | serenity-29ab51800320aab315ed405b223a905fa05756d9.zip |
LibJS: Show run-tests progress in the taskbar
Use the window progress escape sequence to indicate how far along in
the test collection we are while running tests. :^)
Diffstat (limited to 'Libraries/LibJS')
-rwxr-xr-x | Libraries/LibJS/Tests/run-tests.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Libraries/LibJS/Tests/run-tests.sh b/Libraries/LibJS/Tests/run-tests.sh index fdc9b68a57..207dc950dc 100755 --- a/Libraries/LibJS/Tests/run-tests.sh +++ b/Libraries/LibJS/Tests/run-tests.sh @@ -12,8 +12,14 @@ fi pass_count=0 fail_count=0 count=0 +test_count=0 GLOBIGNORE=test-common.js + +for f in *.js; do + (( ++test_count )) +done + for f in *.js; do result="$("$js_program" "$@" -t "$f" 2>/dev/null)" if [ "$result" = "PASS" ]; then @@ -23,10 +29,13 @@ for f in *.js; do echo -ne "( \033[31;1mFail\033[0m ) " (( ++fail_count )) fi + echo -ne "\033]9;${count};${test_count}\033\\" echo "$f" (( ++count )) done +echo -e "\033]9;-1\033\\" + pass_color="" fail_color="" color_off="\033[0m" |