inherit autotools
test-it() {
- ebegin "Testing eaclocal_amflags $1: $2"
+ tbegin "eaclocal_amflags $1: $2"
printf "ACLOCAL_AMFLAGS = %b\n" "$2" > Makefile.am
local flags=$(eaclocal_amflags) exp=${3:-$2}
[[ "${flags}" == "${exp}" ]]
- if ! eend $? ; then
+ if ! tend $? ; then
printf '### INPUT:\n%s\n' "$2"
printf '### FILE:\n%s\n' "$(<Makefile.am)"
printf '### EXPECTED:\n%s\n' "${exp}"
test-it shell-exec '`echo {0..3}`' "0 1 2 3"
test-it multiline '-I oneline \\\n\t-I twoline' "-I oneline -I twoline"
+
+texit
inherit eutils
-tret=0
-
test-path_exists() {
local exp=$1; shift
- ebegin "Testing path_exists($*) == ${exp}"
+ tbegin "path_exists($*) == ${exp}"
path_exists "$@"
[[ ${exp} -eq $? ]]
- eend $?
- : $(( tret |= $? ))
+ tend $?
}
test-path_exists 1
test-path_exists 1 -a ${good} ${bad}
test-path_exists 0 -o ${good} ${bad}
-(exit ${tret})
+texit
# failed test counter
failed=0
-ebegin "Testing scons_clean_makeopts()"
+tbegin "scons_clean_makeopts()"
# sane MAKEOPTS
test-scons_clean_makeopts '--jobs=14 -k'
test-scons_clean_makeopts '--jobs -l3' "--jobs=${jc}"
test-scons_clean_makeopts '-j -l3' "-j ${jc}"
-eend ${failed}
+tend ${failed}
+
+texit
done
return ${ret}
}
-ebegin "Testing tc-arch-kernel() (KV=2.6.0)"
+tbegin "tc-arch-kernel() (KV=2.6.0)"
test-tc-arch-kernel 2.6.0 \
alpha arm{,eb}:arm avr32 bfin:blackfin cris hppa:parisc \
i{3..6}86:i386 ia64 m68k mips{,eb}:mips nios2 powerpc:ppc powerpc64:ppc64 \
s390{,x}:s390 sh{1..4}{,eb}:sh sparc{,64} vax x86_64 \
i{3..6}86-gentoo-freebsd:i386
-eend $?
-ebegin "Testing tc-arch-kernel() (KV=2.6.30)"
+tend $?
+tbegin "tc-arch-kernel() (KV=2.6.30)"
test-tc-arch-kernel 2.6.30 \
i{3..6}86:x86 x86_64:x86 \
powerpc{,64}:powerpc i{3..6}86-gentoo-freebsd:i386
-eend $?
+tend $?
#
# TEST: tc-arch
#
-ebegin "Testing tc-arch"
+tbegin "tc-arch"
ret=0
for CHOST in \
alpha arm{,eb}:arm avr32:avr bfin cris hppa i{3..6}86:x86 ia64 m68k \
((++ret))
fi
done
-eend ${ret}
+tend ${ret}
+
+texit