summaryrefslogtreecommitdiffstats
path: root/tests/run.sh
diff options
context:
space:
mode:
authorKarel Zak2009-01-19 18:27:15 +0100
committerKarel Zak2009-02-11 23:27:55 +0100
commita1be90bba4e4c5fcd427047f5b4622fbe6181e8c (patch)
tree5eddcb481111a9d133ea5bb04ac129eb239bdc5e /tests/run.sh
parenttests: add support for subdirs to basic test functions (diff)
downloadkernel-qcow2-util-linux-a1be90bba4e4c5fcd427047f5b4622fbe6181e8c.tar.gz
kernel-qcow2-util-linux-a1be90bba4e4c5fcd427047f5b4622fbe6181e8c.tar.xz
kernel-qcow2-util-linux-a1be90bba4e4c5fcd427047f5b4622fbe6181e8c.zip
tests: add ./run.sh <component>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/run.sh')
-rwxr-xr-xtests/run.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/run.sh b/tests/run.sh
index cef137160..8a2c7f245 100755
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -17,6 +17,23 @@
#
. 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 ))