diff options
author | Denis Vlasenko | 2008-04-25 08:43:01 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-04-25 08:43:01 +0000 |
commit | 95842fbc163d935cc5f7dc67dd49bbe906c2eae4 (patch) | |
tree | c65356f33af8e6df766bf95d55983ca87b97151f /testsuite | |
parent | a6b3a1f0bfc394a18b4cb4181a4827bf054206b4 (diff) | |
download | busybox-95842fbc163d935cc5f7dc67dd49bbe906c2eae4.zip busybox-95842fbc163d935cc5f7dc67dd49bbe906c2eae4.tar.gz |
testsuite/runtest: remove (last) bashism
mkswap: fix selinux build
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/runtest | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/testsuite/runtest b/testsuite/runtest index c668240..4787648 100755 --- a/testsuite/runtest +++ b/testsuite/runtest @@ -9,12 +9,12 @@ # Option -e will make testcase stop on the first failed command. run_applet_testcase() { - local applet=$1 + local applet="$1" local testcase="$2" local status local uc_applet=$(echo $applet | tr a-z A-Z) - local testname=`basename "$testcase"` + local testname=$(basename "$testcase") if grep -q "^# CONFIG_${uc_applet} is not set$" $bindir/.config; then echo "UNTESTED: $testname" @@ -22,7 +22,7 @@ run_applet_testcase() fi if grep -q "^# FEATURE: " "$testcase"; then - local feature=`sed -ne 's/^# FEATURE: //p' "$testcase"` + local feature=$(sed -ne 's/^# FEATURE: //p' "$testcase") if grep -q "^# ${feature} is not set$" $bindir/.config; then echo "UNTESTED: $testname" @@ -58,7 +58,7 @@ run_applet_tests() local applet=$1 local status=0 for testcase in $tsdir/$applet/*; do - case `basename "$testcase"` in + case $(basename "$testcase") in \#*) continue ;; @@ -130,9 +130,12 @@ for applet in $applets; do # Is this a new-style test? if [ -f "${applet}.tests" ]; then - if [ ! -h "$LINKSDIR/$applet" ] && [ "${applet:0:4}" != "all_" ]; then - echo "SKIPPED: $applet (not built)" - continue + if [ ! -h "$LINKSDIR/$applet" ]; then + # (avoiding bash'ism "${applet:0:4}") + if ! echo "$applet" | grep "^all_" >/dev/null; then + echo "SKIPPED: $applet (not built)" + continue + fi fi # echo "Running test ${tsdir:-.}/${applet}.tests" PATH="$LINKSDIR:$tsdir:$bindir:$PATH" "${tsdir:-.}/${applet}.tests" |