Skip to content

Commit

Permalink
busybox: enable testcase logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-bloch committed Nov 8, 2023
1 parent 9feddd4 commit 5c484af
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions busybox/19-enable-testcase-logging.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
--- busybox-1.27.2/testsuite/runtest 2023-10-27 17:17:52.404370639 +0200
+++ busybox-1.27.2.phoenix/testsuite/runtest 2023-10-27 17:17:16.635573994 +0200
@@ -40,7 +40,7 @@
mkdir -p ".tmpdir.$applet"
cd ".tmpdir.$applet" || return 1

-# echo "Running testcase $testcase"
+ echo "---Testcase $testcase starting---"
d="$tsdir" \
sh -x -e "$testcase" >"$testname.stdout.txt" 2>&1 || status=$?
if [ $status -ne 0 ]; then

--- busybox-1.27.2/testsuite/testing.sh 2023-10-27 17:17:52.404370639 +0200
+++ busybox-1.27.2.phoenix/testsuite/testing.sh 2023-10-27 17:17:16.635573994 +0200
@@ -87,7 +87,7 @@

$ECHO -ne "$3" > expected
$ECHO -ne "$4" > input
- [ -z "$VERBOSE" ] || echo ======================
+ echo "---Testcase $NAME starting---"
[ -z "$VERBOSE" ] || echo "echo -ne '$4' >input"
[ -z "$VERBOSE" ] || echo "echo -ne '$5' | $2"
$ECHO -ne "$5" | eval "$2" > actual

--- busybox-1.27.2/testsuite/bunzip2.tests 2023-10-27 17:17:52.404370639 +0200
+++ busybox-1.27.2.phoenix/testsuite/bunzip2.tests 2023-10-27 17:17:16.635573994 +0200
@@ -488,6 +488,7 @@
}

check() {
+ echo "---Testcase $1 starting---"
eval $2 >t_actual 2>&1
if $ECHO -ne "$expected" | cmp - t_actual; then
echo "PASS: $1"
@@ -535,6 +536,7 @@

# This test is only for bunzip2
if test "${0##*/}" = "bunzip2.tests"; then
+ echo "---Testcase $unpack starting---"
if test1_bz2 | ${bb}bunzip2 >/dev/null \
&& test "`test1_bz2 | ${bb}bunzip2 | md5sum`" = "61bbeee4be9c6f110a71447f584fda7b -"
then

--- busybox-1.27.2/testsuite/bzcat.tests 2023-10-27 17:17:52.404370639 +0200
+++ busybox-1.27.2.phoenix/testsuite/bzcat.tests 2023-10-27 17:17:16.635573994 +0200
@@ -40,6 +40,7 @@
}

check() {
+ echo "---Testcase $1 starting---"
eval $2 >t_actual 2>&1
if $ECHO -ne "$expected" | cmp - t_actual; then
echo "PASS: $1"

0 comments on commit 5c484af

Please sign in to comment.