From c43fd499e3464894c986be3c792d53ef35f2002d Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 12 Aug 2020 17:58:51 +0530 Subject: run-tests.sh: add index of the test being run By showing details as (NNN / MMM) where NNN is the index and MMM is the total test count. This helps anyone looking at the console while tests are running to figure out progress. Updates: #1000 Change-Id: Id42435fada5325484d1bbc5fad8676af5dd1b5b0 Signed-off-by: Amar Tumballi --- run-tests.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'run-tests.sh') diff --git a/run-tests.sh b/run-tests.sh index dc25d8cca31..6d48ecfcb03 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -349,14 +349,15 @@ function run_tests() timeout_cmd_exists="no" fi - for t in $(find ${regression_testsdir}/tests -name '*.t' \ - | LC_COLLATE=C sort) ; do + all_tests=($(find ${regression_testsdir}/tests -name '*.t' | LC_COLLATE=C sort)) + all_tests_cnt=${#all_tests[@]} + for t in "${all_tests[@]}" ; do old_cores=$(ls /*-*.core 2> /dev/null | wc -l) total_tests=$((total_tests+1)) if match $t "$@" ; then selected_tests=$((selected_tests+1)) echo - echo $section_separator$section_separator + echo $section_separator "(${total_tests} / ${all_tests_cnt})" $section_separator if [[ $(get_test_status $t) =~ "BAD_TEST" ]] && \ [[ $skip_bad_tests == "yes" ]] then -- cgit