tests: tests.sh detects directories before trying to execute them
[nit.git] / 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