We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53f1420 commit 5372cd5Copy full SHA for 5372cd5
1 file changed
Docker/OpenWrt/runTests.sh
@@ -1,11 +1,12 @@
1
#!/bin/sh
2
3
runCMD() { # usage: runCMD "<command>" "<retVal>"
4
- eval $1 >/dev/null 2>&1
+ TMP_FILE=$(mktemp)
5
+ eval $1 > $TMP_FILE 2>&1
6
RETVAL=$?
7
if [ "$RETVAL" != "$2" ]; then
- echo "Command ($1) returned ${RETVAL}, but expected $2. Rerunning with output to terminal:"
8
- eval $1
+ echo "Command ($1) returned ${RETVAL}, but expected $2. Error output:"
9
+ cat $TMP_FILE
10
exit 1
11
fi
12
}
0 commit comments