tests: tests.sh detects directories before trying to execute them
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 31 Mar 2015 17:27:49 +0000 (13:27 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 1 Apr 2015 11:36:17 +0000 (07:36 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

tests/tests.sh

index 6c76366..ead5484 100755 (executable)
@@ -69,7 +69,9 @@ saferun()
                        *) stop=true
                esac
        done
-       if test -n "$TIME"; then
+       if test -d "$1"; then
+               find $1 | sort
+       elif test -n "$TIME"; then
                $TIME -o "$o" $a $TIMEOUT "$@"
        else
                if test -n "$a"; then echo 0 >> "$o"; else echo 0 > "$o"; fi