From: Simon Marchi Date: Mon, 30 Sep 2019 15:28:45 +0000 (-0400) Subject: tests: delete temporary files in cli/test_help X-Git-Tag: v2.0.0-rc1~87 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=b5ba8abccb3ce6f65850a918d40781eda51ab8d8 tests: delete temporary files in cli/test_help Also, use `-t` option of mktemp so that temporary files are created in the system's tmp directory (/tmp) instead of the current working directory. Change-Id: If27b7cc420a70033abc81f8f901521ea58a830bc Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/2106 Tested-by: jenkins Reviewed-by: Francis Deslauriers --- diff --git a/tests/cli/test_help b/tests/cli/test_help index b867618e..da6460b7 100755 --- a/tests/cli/test_help +++ b/tests/cli/test_help @@ -28,8 +28,8 @@ source "$UTILSSH" plan_tests 21 -stdout=$(mktemp test_help_stdout.XXXXXX) -stderr=$(mktemp test_help_stderr.XXXXXX) +stdout=$(mktemp -t test_help_stdout.XXXXXX) +stderr=$(mktemp -t test_help_stderr.XXXXXX) # Return 0 if file "$1" exists and is empty, non-0 otherwise. @@ -107,3 +107,5 @@ ok $? "help with unknown component class plugin produces expected error" is_empty "${stdout}" ok $? "help with unknown component class plugin produces no output" + +rm -f "${stdout}" "${stderr}"