[patch] make new parts of testsuite work via make check
Bernhard Fischer
rep.nop at aon.at
Mon Sep 19 00:12:35 UTC 2005
Hi,
When i do make check
i get ln:
creating symbolic link `links/uniq' to `../../busybox': No such file or directory
Attached patch fixes the new tests so they can be run via make check and
by going into the testsuite directory and issuing ./runtests
The new tests do not support -v. Is this intentional?
Please apply,
Bernhard
-------------- next part --------------
diff -X excl -rduNp busybox.oorig/testsuite/busybox.tests busybox/testsuite/busybox.tests
--- busybox.oorig/testsuite/busybox.tests 2005-09-05 21:44:17.000000000 +0200
+++ busybox/testsuite/busybox.tests 2005-09-19 01:39:00.000000000 +0200
@@ -5,7 +5,7 @@
# Licensed under GPL v2, see file LICENSE for details.
if [ ${#COMMAND} -eq 0 ]; then COMMAND=busybox; fi
-. testing.sh
+. ${srcdir}/testing.sh
# We'll assume "cat" is built in, because we need some other command to test.
diff -X excl -rduNp busybox.oorig/testsuite/runtest busybox/testsuite/runtest
--- busybox.oorig/testsuite/runtest 2005-09-05 21:44:17.000000000 +0200
+++ busybox/testsuite/runtest 2005-09-19 01:43:19.000000000 +0200
@@ -97,16 +97,17 @@ for applet in $applets; do
status=1
fi
fi
- applet=`echo "$applet" | sed -n 's/\.tests$//p'`
- if [ ${#applet} != 0 ]
+ applet=$(echo "$applet" | sed -n 's/\.tests$//p')
+ if [ ${#applet} -ne 0 ]
then
- rm -f links/"$applet"
- ln -s ../../busybox links/"$applet"
- PATH=links:$PATH ./"$applet".tests
+ [ -d links ] && rm -f links/"$applet" || mkdir links
+ ln -s ${bindir}/busybox links/"$applet"
+ PATH="links:$PATH" srcdir=${srcdir} ${srcdir}/"$applet".tests
if [ $? -ne 0 ]; then status=1; fi
+ rm -f links/"$applet"
fi
done
-
+rmdir links
exit $status
diff -X excl -rduNp busybox.oorig/testsuite/sort.tests busybox/testsuite/sort.tests
--- busybox.oorig/testsuite/sort.tests 2005-09-02 09:45:29.000000000 +0200
+++ busybox/testsuite/sort.tests 2005-09-19 01:37:00.000000000 +0200
@@ -5,7 +5,7 @@
# Licensed under GPL v2, see file LICENSE for details.
if [ ${#COMMAND} -eq 0 ]; then COMMAND=sort; fi
-. testing.sh
+. ${srcdir}/testing.sh
# The basic tests. These should work even with the small busybox.
diff -X excl -rduNp busybox.oorig/testsuite/uniq.tests busybox/testsuite/uniq.tests
--- busybox.oorig/testsuite/uniq.tests 2005-09-15 22:00:44.000000000 +0200
+++ busybox/testsuite/uniq.tests 2005-09-19 01:38:48.000000000 +0200
@@ -7,7 +7,7 @@
# AUDIT: Full SUSv3 coverage (except internationalization).
if [ ${#COMMAND} -eq 0 ]; then COMMAND=uniq; fi
-. testing.sh
+. ${srcdir}/testing.sh
# testing "test name" "options" "expected result" "file input" "stdin"
# file input will be file called "input"
@@ -62,7 +62,7 @@ bb cc dd8
aa bb cc9
"
-# -d is "Suppress the writing fo lines that are not repeated in the input."
+# -d is "Suppress the writing of lines that are not repeated in the input."
# -u is "Suppress the writing of lines that are repeated in the input."
# Therefore, together this means they should produce no output.
testing "uniq -u and -d produce no output" "-d -u" "" "" \
More information about the busybox
mailing list