← Commit list

89a22ea5d

Bernhard Reutner-Fischer
Bernhard Reutner-Fischer
2006-05-25
SOURCE BUG Duration: 48s

Subject

make the testsuite a little less brittle: - 'function fn_name\n{' breaks on older FreeBSD default shells, so use the more widely supported 'fn_name () {'. This needs more fixing.. - test for integers ought to use the proper operators - test for strings ought to use quoting of the strings to be fai

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

testsuite/runtest+12 -9
@@ -33,16 +33,15 @@ function run_applet_testcase
rm -rf tmp
mkdir -p tmp
- pushd tmp >/dev/null
+ pushd tmp > /dev/null
- d=$srcdir sh -x -e $testcase >.logfile.txt 2>&1
+ d=$srcdir sh -x -e $testcase >.logfile.txt 2>&1 || status=$?
- if [ $? != 0 ] ; then
+ if [ $status -ne 0 ] ; then
echo FAIL: $testname
if [ $verbose -gt 0 ]; then
cat .logfile.txt
- #exit 1;
- fi;
+ fi
status=$?
else
echo PASS: $testname
@@ -50,7 +49,7 @@ function run_applet_testcase
status=$?
fi
- popd >/dev/null
+ popd > /dev/null
rm -rf tmp
return $status
@@ -122,14 +121,18 @@ for applet in $applets; do
applet=$(echo "$applet" | sed -n 's/\.tests$//p')
if [ ${#applet} -ne 0 ]
then
- if [ ! -h "$LINKSDIR/$applet" ] && [ ${applet:0:4} != "all_" ]
+ if [ ! -h "$LINKSDIR/$applet" ] && [ "${applet:0:4}" != "all_" ]
then
echo "SKIPPED: $applet (not built)"
continue
fi
- PATH="$LINKSDIR":$srcdir:$bindir:$PATH \
+ if PATH="$LINKSDIR":$srcdir:$bindir:$PATH \
"${srcdir:-.}/$applet".tests
- if [ $? -ne 0 ]; then status=1; fi
+ then
+ :
+ else
+ status=1
+ fi
fi
done
testsuite/testing.sh+10 -6
@@ -37,7 +37,7 @@ export SKIP=
# Helper functions
-optional()
+optional ()
{
option=`echo "$OPTIONFLAGS" | egrep "(^|:)$1(:|\$)"`
# Not set?
@@ -55,6 +55,7 @@ testing ()
{
NAME="$1"
[ -z "$1" ] && NAME=$2
+ ret=0
if [ $# -ne 5 ]
then
@@ -76,12 +77,15 @@ testing ()
echo -ne "$5" | eval "$2" > actual
RETVAL=$?
- cmp expected actual > /dev/null
- if [ $? -ne 0 ]
+ cmp expected actual > /dev/null || ret=$?
+ if [ $ret -ne 0 ]
then
FAILCOUNT=$[$FAILCOUNT+1]
echo "FAIL: $NAME"
- [ -n "$VERBOSE" ] && diff -u expected actual
+ if [ -n "$VERBOSE" ]
+ then
+ diff -u expected actual || /bin/true
+ fi
else
echo "PASS: $NAME"
fi
@@ -97,7 +101,7 @@ testing ()
# the file is assumed to already be there and only its library dependencies
# are copied.
-function mkchroot
+mkchroot ()
{
[ $# -lt 2 ] && return
@@ -126,7 +130,7 @@ function mkchroot
# Needed commands listed on command line
# Script fed to stdin.
-function dochroot
+dochroot ()
{
mkdir tmpdir4chroot
mount -t ramfs tmpdir4chroot tmpdir4chroot