From: Junio C Hamano Date: Wed, 20 Nov 2019 04:12:54 GMT Subject: Re: [PATCH] perf-lib: remove old result files before running tests Message-ID: In-Reply-To: <20191119185047.8550-1-t.gummerer@gmail.com> Thomas Gummerer writes: > @@ -178,10 +178,11 @@ test_wrapper_ () { > export test_prereq > if ! test_skip "$@" > then > - base=$(basename "$0" .sh) So we used to use $base to hold the number and the filename here > - echo "$test_count" >>"$perf_results_dir"/$base.subtests > - echo "$1" >"$perf_results_dir"/$base.$test_count.descr > base="$perf_results_dir"/"$PERF_RESULTS_PREFIX$(basename "$0" .sh)"."$test_count" and then redefined it to be the results-prefix specific one. > + rm -f "$base".* you now remove those results-prefix specific one for the $test_count (I guess that is as specific you can go) before writing the count and the description. So this "rm -f" is a no-op when perf-results-prefix is not empty? > + no_prefix_base="$perf_results_dir"/$(basename "$0" .sh) > + echo "$test_count" >>$no_prefix_base.subtests > + echo "$1" >$no_prefix_base.$test_count.descr > "$test_wrapper_func_" "$@" > fi