diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2021-03-06 15:42:35 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-07 10:59:51 +0100 |
commit | 1496b022037d24f83d034459a65a84f1df92bd8f (patch) | |
tree | f8d4f0bf2a693e30e3cfeb6b2902cf7381313d6a /Base/home/anon | |
parent | 13b65b632af48db0bd84d49799dcf22b411a6e24 (diff) | |
download | serenity-1496b022037d24f83d034459a65a84f1df92bd8f.zip |
Meta: Use the new Shell features to improve run-tests-and-shutdown
Fixes two TODOs in that file :^)
Diffstat (limited to 'Base/home/anon')
-rwxr-xr-x | Base/home/anon/tests/run-tests-and-shutdown.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Base/home/anon/tests/run-tests-and-shutdown.sh b/Base/home/anon/tests/run-tests-and-shutdown.sh index e14f5b78da..265f3a7760 100755 --- a/Base/home/anon/tests/run-tests-and-shutdown.sh +++ b/Base/home/anon/tests/run-tests-and-shutdown.sh @@ -2,9 +2,10 @@ echo "==== Running Tests on SerenityOS ====" -run() { +run(index) { + shift test_cmd=($*) - echo "Running test -- $test_cmd" + echo "Running test $index out of $count_of_all_tests -- $test_cmd" if $test_cmd { echo "::debug file=$test_cmd:: $test_cmd passed!" } else { @@ -12,15 +13,14 @@ run() { } } -# TODO: It'd be nice to have a list+list op (as opposed to nest-on-in-another) -# TODO: It'd be nice to have a list.length or enumerate(list) operation to allow terminal progress bar # TODO: test-web requires the window server system_tests=((test-js --show-progress=false) test-pthread test-compress /usr/Tests/LibM/test-math (test-crypto bigint -t)) # FIXME: Running too much at once is likely to run into #5541. Remove commented out find below when stable -all_tests=($system_tests) #$(find /usr/Tests -type f | grep -v Kernel | grep -v .inc | shuf)) +all_tests=${concat_lists $system_tests} #$(find /usr/Tests -type f | grep -v Kernel | grep -v .inc | shuf)) +count_of_all_tests=${length $all_tests} -for list in $all_tests { - for $list { run $it } +for index i cmd in $all_tests { + run $(expr $i + 1) $cmd } echo "==== Done running tests ====" |