tests: delete temporary files in cli/test_help
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 30 Sep 2019 15:28:45 +0000 (11:28 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 3 Oct 2019 14:45:11 +0000 (10:45 -0400)
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 <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2106
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
tests/cli/test_help

index b867618e3b125f49453aaeb51204f68a878ae537..da6460b76bb0244eea77b8484bd26f3b0b2de310 100755 (executable)
@@ -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}"
This page took 0.024276 seconds and 4 git commands to generate.