From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Cc: David Abdurachmanov <david.abdurachmanov@gmail.com>,
Mark Wielaard <mark@klomp.org>
Subject: [PATCH] tests: Don't redirect output to /dev/null in run-native-test.sh
Date: Tue, 12 Dec 2023 10:49:33 +0100 [thread overview]
Message-ID: <20231212094933.392565-1-mark@klomp.org> (raw)
By redirecting all output to /dev/null in run-native-test.sh the
run-native-test.sh.log file will be empty on failures. This makes
it hard to figure out what went wrong.
* tests/run-native-test.sh: Remove /dev/null redirects.
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
tests/run-native-test.sh | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/tests/run-native-test.sh b/tests/run-native-test.sh
index 042a51c6..01a52e82 100755
--- a/tests/run-native-test.sh
+++ b/tests/run-native-test.sh
@@ -57,10 +57,10 @@ trap native_exit 0
for cc in "$HOSTCC" "$HOST_CC" cc gcc "$CC"; do
test "x$cc" != x || continue
- $cc -o native -g native.c > /dev/null 2>&1 &&
+ $cc -o native -g native.c &&
# Some shell versions don't do this right without the braces.
- { ./native > /dev/null 2>&1 & native=$! ; } &&
- sleep 1 && kill -0 $native 2> /dev/null &&
+ { ./native & native=$! ; } &&
+ sleep 1 && kill -0 $native &&
break ||
native=0
done
@@ -68,14 +68,17 @@ done
native_test()
{
# Try the build against itself, i.e. $config_host.
- testrun "$@" -e $1 > /dev/null
+ echo "Try the build against itself: $@ -e $1"
+ testrun "$@" -e $1
# Try the build against a presumed native process, running this sh.
# For tests requiring debug information, this may not test anything.
- testrun "$@" -p $$ > /dev/null
+ echo "Try the build against a presumed native process: $@ -p $$"
+ testrun "$@" -p $$
# Try the build against the trivial native program we just built with -g.
- test $native -eq 0 || testrun "$@" -p $native > /dev/null
+ echo "Try the build against the trivial native program: $@ -p $native"
+ test $native -eq 0 || testrun "$@" -p $native
}
native_test ${abs_builddir}/allregs
--
2.39.3
next reply other threads:[~2023-12-12 9:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 9:49 Mark Wielaard [this message]
2023-12-18 12:34 ` Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231212094933.392565-1-mark@klomp.org \
--to=mark@klomp.org \
--cc=david.abdurachmanov@gmail.com \
--cc=elfutils-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).