From 4326a95b9b6d9b7a25271e585adac77441f8f92c Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 6 Sep 2019 10:58:51 -0700 Subject: [PATCH] scoutfs-tests: create results dir before logging We can't use cmd() to create the results dir because it tries to redirect output to the results dir, which fails, so mkdir isn't run and we don't create the results dir. Signed-off-by: Zach Brown --- tests/run-tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 5f132e7a..060e76a5 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -214,7 +214,9 @@ test -z "$tests" && \ die "no tests found by including $T_INCLUDE and excluding $T_EXCLUDE" # create results dir -test -e "$T_RESULTS" || cmd mkdir -p "$T_RESULTS" +test -e "$T_RESULTS" || mkdir -p "$T_RESULTS" +test -d "$T_RESULTS" || \ + die "$T_RESULTS dir is not a directory" # checkout and build kernel module if [ -n "$T_KMOD_REPO" ]; then