Re: [PATCH] test-lib: avoid full path to store test results
From: Elia Pinto <hidden>
Date: 2016-06-15 22:55:09
The shell word splitting done in base is a bashism, iow not portable. Best 2012/10/30, Felipe Contreras [off-list ref]:
quoted hunk ↗ jump to hunk
No reason to use the full path in case this is used externally. Signed-off-by: Felipe Contreras <redacted> --- t/test-lib.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)diff --git a/t/test-lib.sh b/t/test-lib.sh index 514282c..5a3d665 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh@@ -389,7 +389,8 @@ test_done () { then test_results_dir="$TEST_OUTPUT_DIRECTORY/test-results" mkdir -p "$test_results_dir" - test_results_path="$test_results_dir/${0%.sh}-$$.counts" + base=${0##*/} + test_results_path="$test_results_dir/${base%.sh}-$$.counts" cat >>"$test_results_path" <<-EOF total $test_count --1.8.0 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
-- Inviato dal mio dispositivo mobile