summaryrefslogtreecommitdiff
path: root/tests/common
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-02-19 19:24:07 +0100
committerDavid Sterba <dsterba@suse.com>2018-02-19 19:24:07 +0100
commit510bb4ccc4258567e731b81c4722a6adc7faec8b (patch)
tree912f87f7942bbbf99a880d9287d4606f5ce94bf4 /tests/common
parentea0956bb2a26ca0deb1bcba186a0e53ab07164a5 (diff)
btrfs-progs: tests: add helper to log pipe stdout
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests/common')
-rw-r--r--tests/common7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/common b/tests/common
index fae30f1d..4b266c5b 100644
--- a/tests/common
+++ b/tests/common
@@ -54,6 +54,13 @@ _log()
echo "$*" | tee -a "$RESULTS"
}
+# copy stdout to log and pass to stdout, eg. another stdout consumer, commands
+# should redirect stderr to stdout if this is consmed by further commands
+_log_stdout()
+{
+ tee -a "$RESULTS"
+}
+
_not_run()
{
echo " [NOTRUN] $*"