]> diplodocus.org Git - nmh/commitdiff
Create $MH_OBJ_DIR/test/testdir if it doesn't already exist. This
authorDavid Levine <levinedl@acm.org>
Mon, 15 Aug 2016 14:58:33 +0000 (10:58 -0400)
committerDavid Levine <david.levine@gonift.com>
Mon, 15 Aug 2016 15:01:02 +0000 (11:01 -0400)
allows a test to be run standalone, now that said directory must
exist before defining $MH_TEST_DIR.

(cherry picked from commit 0f53d91688c0fab28b900ad27a1610a755dea526)

test/common.sh.in

index 144a1bed4b1179e0f3edcde367434bbe8df77936..7a4fc7aad0af8d07e52ae9bd1db85cdfef70fc78 100644 (file)
@@ -7,6 +7,7 @@
 #### outside of make.  Requires that MH_OBJ_DIR be set on entry.
 #### Use the result of cd and pwd -P so that the result will agree
 #### with what getcwd(3) returns.
+test -d "$MH_OBJ_DIR/test/testdir"  ||  mkdir -p "$MH_OBJ_DIR/test/testdir"
 test -z "$MH_TEST_DIR" && MH_TEST_DIR=`cd "$MH_OBJ_DIR/test/testdir" && pwd -P`
 export MH_TEST_DIR
 test -z "$MH_INST_DIR"  &&  MH_INST_DIR="${MH_TEST_DIR}/inst"