]> err.no Git - util-linux/commitdiff
tests: add ./run.sh <component>
authorKarel Zak <kzak@redhat.com>
Mon, 19 Jan 2009 17:27:15 +0000 (18:27 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Feb 2009 22:27:55 +0000 (23:27 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/run.sh

index cef1371606579a87e72fd54af9d8df7b00708708..8a2c7f245fbc2e53dc56bdb440f4598db31dee55 100755 (executable)
 #
 . functions.sh
 
+comps=$(find ts/ -type f -perm /a+x -regex "[^\.~]*" |  sort)
+
+if [ -n "$1" ]; then
+       if [ -d "ts/$1" ]; then
+               comps=$(find ts/$1 -type f -perm /a+x -regex "[^\.~]*" |  sort)
+       else
+               echo
+               echo "usage: $0 [<component>]"
+               echo "supported components:"
+                       for ts in $comps; do
+                               echo -e "\t$(basename $(dirname $ts))"
+                       done | sort -u
+               echo
+               exit 1
+       fi
+fi
+
 echo
 echo "------------------ Utils-linux-ng regression tests ------------------"
 echo
@@ -26,7 +43,7 @@ echo
 
 res=0
 count=0
-for ts in $(find ts/ -type f -perm /a+x -regex "[^\.~]*" |  sort); do
+for ts in $comps; do
        ./$ts "$1"
        res=$(( $res + $? ))
        count=$(( $count + 1 ))