Skip to content

Commit a4a16a5

Browse files
committed
Skip undefined functions when processing TESTS
Do not attempt to invoke test functions specified via the TESTS environment variable if they are not defined. The Makefile invokes multiple test scripts and each test function is only defined in one of them.
1 parent 44c8245 commit a4a16a5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/utils

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ assertFile() {
269269
if [ -n "$TESTS" ]; then
270270
suite() {
271271
for shunit_func_ in ${TESTS}; do
272-
suite_addTest ${shunit_func_}
272+
if declare -F ${shunit_func_} > /dev/null; then
273+
suite_addTest ${shunit_func_}
274+
fi
273275
done
274276
unset shunit_func_
275277
}

0 commit comments

Comments
 (0)