diff options
author | David Sterba <dsterba@suse.com> | 2015-10-26 19:51:10 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-11-02 09:35:08 +0100 |
commit | 425274ed8f7a525e997a64abf3492573f3ed967d (patch) | |
tree | c869449fecec1c25581962f3a29cddcfe9a5324a | |
parent | a73eb8b993dc644f6b10fc18b9036f89e00588e2 (diff) |
btrfs-progs: tests: do not log output of run_mayfail to terminal
No need to log expected failures to the terminal, the results file is
fine; pass the return value of the command.
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | tests/common | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/common b/tests/common index ea9a569b..61780486 100644 --- a/tests/common +++ b/tests/common @@ -51,9 +51,13 @@ run_mayfail() echo "############### $@" >> $RESULTS 2>&1 if [ "$TEST_LOG" = 'tty' ]; then echo "CMD(mayfail): $@" > /dev/tty; fi if [ "$1" = 'root_helper' ]; then - "$@" >> $RESULTS 2>&1 || _log "failed (ignored): $@" + "$@" >> $RESULTS 2>&1 else - $INSTRUMENT "$@" >> $RESULTS 2>&1 || _log "failed (ignored): $@" + $INSTRUMENT "$@" >> $RESULTS 2>&1 + fi + if [ $? != 0 ]; then + echo "failed (ignored): $@" >> $RESULTS + return 1 fi } |