More unit fixes.
This commit is contained in:
parent
aa57dd1ff6
commit
28a65393ca
1
src/test/.gitignore
vendored
1
src/test/.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/*.out
|
/*.out
|
||||||
|
tmp-*
|
||||||
|
@ -7,5 +7,8 @@ gitignore:
|
|||||||
check test::
|
check test::
|
||||||
./runtests.sh
|
./runtests.sh
|
||||||
|
|
||||||
|
verbose-test:
|
||||||
|
VERBOSE=yes ./runtests.sh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.out
|
rm -rf *.out tmp-*
|
||||||
|
@ -68,10 +68,9 @@ ret=$(($ret + $?))
|
|||||||
|
|
||||||
einfo "Running unit tests"
|
einfo "Running unit tests"
|
||||||
eindent
|
eindent
|
||||||
cd units
|
for u in units/*; do
|
||||||
for u in *; do
|
|
||||||
[ -x "${u}" -a -f "${u}" ] || continue
|
[ -x "${u}" -a -f "${u}" ] || continue
|
||||||
ebegin "${u}"
|
ebegin "$(basename "${u}")"
|
||||||
./"${u}"
|
./"${u}"
|
||||||
eend $?
|
eend $?
|
||||||
ret=$(($ret + $?))
|
ret=$(($ret + $?))
|
||||||
|
@ -2,9 +2,12 @@
|
|||||||
# unit test for is_older_than code of baselayout (2008/06/19)
|
# unit test for is_older_than code of baselayout (2008/06/19)
|
||||||
# Author: Matthias Schwarzott <zzam@gentoo.org>
|
# Author: Matthias Schwarzott <zzam@gentoo.org>
|
||||||
|
|
||||||
RCDIR=../../rc
|
|
||||||
TMPDIR=tmp-"$(basename "$0")"
|
TMPDIR=tmp-"$(basename "$0")"
|
||||||
|
|
||||||
|
# Please note that we added this unit test because the function
|
||||||
|
# should really be called is_newer_than as it's what it's really testing.
|
||||||
|
# Or more perversly, returning 0 on failure and 1 and success.
|
||||||
|
|
||||||
# bool is_older_than(reference, files/dirs to check)
|
# bool is_older_than(reference, files/dirs to check)
|
||||||
#
|
#
|
||||||
# return 0 if any of the files/dirs are newer than
|
# return 0 if any of the files/dirs are newer than
|
||||||
|
Loading…
Reference in New Issue
Block a user