]> git.stg.codes - stg.git/blobdiff - functest/do.sh
Template group.
[stg.git] / functest / do.sh
index 77d928a5ee6fd4253aa5bb5acd9ca4f64e3f3459..652dbcec329b0fbd8db48b0d291ca7ca6960761d 100755 (executable)
@@ -4,7 +4,7 @@ MKTEMP=/usr/bin/mktemp
 RM=/bin/rm
 
 printf "Creating temporary dir... "
-DIR=`$MKTEMP -d`
+DIR=`$MKTEMP -d 2> /dev/null || $MKTEMP -d -t stg`
 
 if [ "$DIR" == "" ]
 then
@@ -20,7 +20,7 @@ fi
 
 LOGFILE=`date "+%Y-%m-%d-%H%M%S.log"`
 
-printf "Ok.\nCloning... "
+printf "Ok. Working dir: $DIR\nCloning... "
 ./clone.sh "$DIR" >> "$LOGFILE" 2>&1
 if [ "$?" != "0" ]
 then
@@ -35,16 +35,12 @@ then
     printf "Failed.\n"
     exit -1
 else
-    printf "Ok.\nTesting... "
+    printf "Ok.\n"
 fi
+
 ./test.sh "$DIR" # >> "$LOGFILE" 2>&1
-if [ "$?" != "0" ]
-then
-    printf "Failed.\n"
-    exit -1
-else
-    printf "Ok.\nCleaning up... "
-fi
+
+printf "Cleaning up... "
 
 $RM -rf $DIR
 if [ "$?" != "0" ]