commit: 5844fcae98ccc4d28aa1709fe1783b4232dac6ff
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 1 13:09:37 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan 8 05:14:36 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5844fcae
scons-utils.eclass: tests, be more verbose on tests being performed
eclass/tests/scons-utils.sh | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/eclass/tests/scons-utils.sh b/eclass/tests/scons-utils.sh
index 5a65fbe..7387135 100755
--- a/eclass/tests/scons-utils.sh
+++ b/eclass/tests/scons-utils.sh
@@ -8,7 +8,9 @@ source tests-common.sh
inherit scons-utils
test-scons_clean_makeopts() {
- local sconsopts=$(scons_clean_makeopts ${1})
+ tbegin "scons_clean_makeopts() for ${1}"
+
+ local sconsopts=$(scons_clean_makeopts ${1}) ret=0
if [[ ${sconsopts} != ${2-${1}} ]]; then
eerror "Self-test failed:"
@@ -17,11 +19,11 @@ test-scons_clean_makeopts() {
eerror "Expected: ${2-${1}}"
eerror "Actual: ${sconsopts}"
eoutdent
- (( ++failed ))
- return 1
+ ret=1
fi
- return 0
+ tend ${ret}
+ return ${ret}
}
# jobcount expected for non-specified state
@@ -29,8 +31,6 @@ jc=5
# failed test counter
failed=0
-tbegin "scons_clean_makeopts()"
-
# sane MAKEOPTS
test-scons_clean_makeopts '--jobs=14 -k'
test-scons_clean_makeopts '--jobs=14 -k'
@@ -59,6 +59,4 @@ test-scons_clean_makeopts '--jobs funnystuff -k'
"--jobs=${jc} -k"
test-scons_clean_makeopts '--jobs -l3' "--jobs=${jc}"
test-scons_clean_makeopts '-j -l3' "-j ${jc}"
-tend ${failed}
-
texit