From: Pavel TvrdĂ­k Date: Fri, 27 Mar 2015 13:01:30 +0000 (+0100) Subject: Birdtest: Fix calc num of build-failured tests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=016e7be6e5d7c595909cff1da88dfdd4cbc0c493;p=thirdparty%2Fbird.git Birdtest: Fix calc num of build-failured tests --- diff --git a/tools/Makefile-top.in b/tools/Makefile-top.in index ff98037f4..4a8883b5d 100644 --- a/tools/Makefile-top.in +++ b/tools/Makefile-top.in @@ -10,7 +10,7 @@ docs userdocs progdocs: $(MAKE) -C doc $@ check: tests - tools/run_tests.sh $(objdir) $(srcdir) + tools/run_tests.sh "@objdir@" "@srcdir@" clean: $(MAKE) -C $(objdir) clean diff --git a/tools/run_tests.sh b/tools/run_tests.sh index d06d341be..f1a2b0d38 100755 --- a/tools/run_tests.sh +++ b/tools/run_tests.sh @@ -3,7 +3,7 @@ objdir=$1 srcdir=$2 -all_tests=$(find $objdir -name '*_test') +all_tests=$(find "$objdir" -name '*_test') num_all_tests=0 for i in $all_tests; do num_all_tests=$((num_all_tests + 1)); done @@ -20,7 +20,9 @@ for test in $all_tests ; do done num_all_tests_src=0 -for i in $(find $srcdir -name '*_test.c'); do num_all_tests_src=$((num_all_tests_src + 1)); done +for dir in client conf filter lib misc nest proto sysdep; do + for i in $(find "$srcdir/$dir" -name '*_test.c'); do num_all_tests_src=$((num_all_tests_src + 1)); done +done num_build_fail_tests=$((num_all_tests_src - num_all_tests)) echo ""