]> 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 <levinedl@acm.org>
Mon, 15 Aug 2016 14:58:33 +0000 (10:58 -0400)
allows a test to be run standalone, now that said directory must
exist before defining $MH_TEST_DIR.

test/common.sh.in

index c121d5d..ae91619 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"