aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-04-25 08:43:01 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-04-25 08:43:01 +0000
commit95842fbc163d935cc5f7dc67dd49bbe906c2eae4 (patch)
treec65356f33af8e6df766bf95d55983ca87b97151f /testsuite
parenta6b3a1f0bfc394a18b4cb4181a4827bf054206b4 (diff)
downloadbusybox-w32-95842fbc163d935cc5f7dc67dd49bbe906c2eae4.tar.gz
busybox-w32-95842fbc163d935cc5f7dc67dd49bbe906c2eae4.tar.bz2
busybox-w32-95842fbc163d935cc5f7dc67dd49bbe906c2eae4.zip
testsuite/runtest: remove (last) bashism
mkswap: fix selinux build
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/runtest17
1 files changed, 10 insertions, 7 deletions
diff --git a/testsuite/runtest b/testsuite/runtest
index c668240eb..478764801 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -9,12 +9,12 @@
9# Option -e will make testcase stop on the first failed command. 9# Option -e will make testcase stop on the first failed command.
10run_applet_testcase() 10run_applet_testcase()
11{ 11{
12 local applet=$1 12 local applet="$1"
13 local testcase="$2" 13 local testcase="$2"
14 14
15 local status 15 local status
16 local uc_applet=$(echo $applet | tr a-z A-Z) 16 local uc_applet=$(echo $applet | tr a-z A-Z)
17 local testname=`basename "$testcase"` 17 local testname=$(basename "$testcase")
18 18
19 if grep -q "^# CONFIG_${uc_applet} is not set$" $bindir/.config; then 19 if grep -q "^# CONFIG_${uc_applet} is not set$" $bindir/.config; then
20 echo "UNTESTED: $testname" 20 echo "UNTESTED: $testname"
@@ -22,7 +22,7 @@ run_applet_testcase()
22 fi 22 fi
23 23
24 if grep -q "^# FEATURE: " "$testcase"; then 24 if grep -q "^# FEATURE: " "$testcase"; then
25 local feature=`sed -ne 's/^# FEATURE: //p' "$testcase"` 25 local feature=$(sed -ne 's/^# FEATURE: //p' "$testcase")
26 26
27 if grep -q "^# ${feature} is not set$" $bindir/.config; then 27 if grep -q "^# ${feature} is not set$" $bindir/.config; then
28 echo "UNTESTED: $testname" 28 echo "UNTESTED: $testname"
@@ -58,7 +58,7 @@ run_applet_tests()
58 local applet=$1 58 local applet=$1
59 local status=0 59 local status=0
60 for testcase in $tsdir/$applet/*; do 60 for testcase in $tsdir/$applet/*; do
61 case `basename "$testcase"` in 61 case $(basename "$testcase") in
62 \#*) 62 \#*)
63 continue 63 continue
64 ;; 64 ;;
@@ -130,9 +130,12 @@ for applet in $applets; do
130 130
131 # Is this a new-style test? 131 # Is this a new-style test?
132 if [ -f "${applet}.tests" ]; then 132 if [ -f "${applet}.tests" ]; then
133 if [ ! -h "$LINKSDIR/$applet" ] && [ "${applet:0:4}" != "all_" ]; then 133 if [ ! -h "$LINKSDIR/$applet" ]; then
134 echo "SKIPPED: $applet (not built)" 134 # (avoiding bash'ism "${applet:0:4}")
135 continue 135 if ! echo "$applet" | grep "^all_" >/dev/null; then
136 echo "SKIPPED: $applet (not built)"
137 continue
138 fi
136 fi 139 fi
137# echo "Running test ${tsdir:-.}/${applet}.tests" 140# echo "Running test ${tsdir:-.}/${applet}.tests"
138 PATH="$LINKSDIR:$tsdir:$bindir:$PATH" "${tsdir:-.}/${applet}.tests" 141 PATH="$LINKSDIR:$tsdir:$bindir:$PATH" "${tsdir:-.}/${applet}.tests"