summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@kadalu.io>2020-08-12 17:58:51 +0530
committerMOHIT AGRAWAL <moagrawa@redhat.com>2020-08-13 04:25:02 +0000
commitc43fd499e3464894c986be3c792d53ef35f2002d (patch)
tree7641557eb34cef8e6f27cf1c7564549022a0cd4a
parent320bf93d36a1c20d661cb11968825fc055fcc168 (diff)
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 <amar@kadalu.io>
-rwxr-xr-xrun-tests.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/run-tests.sh b/run-tests.sh
index dc25d8c..6d48ecf 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