Skip to content

Commit

Permalink
scons-utils.eclass: tests, be more verbose on tests being performed
Browse files Browse the repository at this point in the history
  • Loading branch information
mgorny committed Jan 8, 2016
1 parent 5950a76 commit 5844fca
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions eclass/tests/scons-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand All @@ -17,20 +19,18 @@ 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
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'
Expand Down Expand Up @@ -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

0 comments on commit 5844fca

Please sign in to comment.