diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-23 06:45:11 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-23 06:45:11 +0000 |
| commit | 58dc274a7aefcbe80efe2a99742811a8affaca44 (patch) | |
| tree | 63f331def4ed05dba99cb925d7149849a11a3d9b | |
| parent | fa5b05ab070ccbdd4f962b97d69a7c141618aa04 (diff) | |
| download | busybox-w32-58dc274a7aefcbe80efe2a99742811a8affaca44.tar.gz busybox-w32-58dc274a7aefcbe80efe2a99742811a8affaca44.tar.bz2 busybox-w32-58dc274a7aefcbe80efe2a99742811a8affaca44.zip | |
testsuite: runtest enhancements by Cristian Ionescu-Idbohrn
| -rwxr-xr-x | testsuite/runtest | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/testsuite/runtest b/testsuite/runtest index fc8392ac5..c668240eb 100755 --- a/testsuite/runtest +++ b/testsuite/runtest | |||
| @@ -10,19 +10,19 @@ | |||
| 10 | run_applet_testcase() | 10 | run_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" |
| 21 | return 0 | 21 | return 0 |
| 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,10 +58,19 @@ 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 | if [ "$testcase" = "$tsdir/$applet/CVS" ]; then | 61 | case `basename "$testcase"` in |
| 62 | \#*) | ||
| 63 | continue | ||
| 64 | ;; | ||
| 65 | *\~) | ||
| 66 | continue | ||
| 67 | ;; | ||
| 68 | esac | ||
| 69 | if [ "$testcase" = "$tsdir/$applet/CVS" ] || | ||
| 70 | [ "$testcase" = "$tsdir/$applet/.svn" ]; then | ||
| 62 | continue | 71 | continue |
| 63 | fi | 72 | fi |
| 64 | run_applet_testcase $applet $testcase | 73 | run_applet_testcase "$applet" "$testcase" |
| 65 | test $? = 0 || status=1 | 74 | test $? = 0 || status=1 |
| 66 | done | 75 | done |
| 67 | return $status | 76 | return $status |
