summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2013-06-10 21:33:34 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2013-06-10 21:37:28 +0200
commit193eda32fb982407f332d28c8ec42edd701791e7 (patch)
treec6da8f925749566d445f6815f981ec865b1676cb /tests
parent7c4714bf9042d38d0540780d5fb4b33c06a25ab8 (diff)
downloadptxdist-193eda32fb982407f332d28c8ec42edd701791e7.tar.gz
ptxdist-193eda32fb982407f332d28c8ec42edd701791e7.tar.xz
libptxdisttest.sh: propagate result in test_end
This way a full test can return its result: test_foo() { test_begin checking "foo" foo result test_end } if test_foo; then # do something that needs foo fi Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/libptxdisttest.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/libptxdisttest.sh b/tests/libptxdisttest.sh
index c14d6a756..783a542c4 100644
--- a/tests/libptxdisttest.sh
+++ b/tests/libptxdisttest.sh
@@ -123,9 +123,11 @@ test_begin() {
}
test_end() {
+ local ret="$?"
reportwrite time end
echo "</test>" >> "$REPORTFILE"
if [ "$exit_now" = "1" ]; then exit 1; fi
+ return "${ret}"
}
checking() {