all.sh: keep dd output in non-quiet mode
Since dd prints everything on stderr, both normal status update and actual errors when they occur, redirecting that to /dev/null is a trade-off that's acceptable in quiet mode (typically used on a developer's machine and the developer will re-run in non-quiet mode if anything fails without sufficient detail in the output), but not that much in non-quiet mode. For example, if our dd invocation fails because the disk in full on a CI machine, we want the error to be reported at the time we invoke dd, and not later when a seemingly unrelated test fails due to an incorrect seedfile. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
129e13cb12
commit
f1f180a6a1
1 changed files with 7 additions and 1 deletions
|
@ -510,10 +510,16 @@ pre_setup_quiet_redirect () {
|
||||||
redirect_out () {
|
redirect_out () {
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
|
redirect_err () {
|
||||||
|
"$@"
|
||||||
|
}
|
||||||
else
|
else
|
||||||
redirect_out () {
|
redirect_out () {
|
||||||
"$@" >/dev/null
|
"$@" >/dev/null
|
||||||
}
|
}
|
||||||
|
redirect_err () {
|
||||||
|
"$@" 2>/dev/null
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1925,7 +1931,7 @@ run_component () {
|
||||||
# Unconditionally create a seedfile that's sufficiently long.
|
# Unconditionally create a seedfile that's sufficiently long.
|
||||||
# Do this before each component, because a previous component may
|
# Do this before each component, because a previous component may
|
||||||
# have messed it up or shortened it.
|
# have messed it up or shortened it.
|
||||||
dd if=/dev/urandom of=./tests/seedfile bs=64 count=1 >/dev/null 2>&1
|
redirect_err dd if=/dev/urandom of=./tests/seedfile bs=64 count=1
|
||||||
|
|
||||||
# Run the component code.
|
# Run the component code.
|
||||||
if [ $QUIET -eq 1 ]; then
|
if [ $QUIET -eq 1 ]; then
|
||||||
|
|
Loading…
Reference in a new issue