[med-svn] [Git][med-team/bart][master] patch to print out number of failing test

Martin Uecker (@uecker-guest) gitlab at salsa.debian.org
Mon Oct 25 18:05:27 BST 2021



Martin Uecker pushed to branch master at Debian Med / bart


Commits:
293bc27d by Martin Uecker at 2021-10-25T19:01:31+02:00
patch to print out number of failing test

- - - - -


2 changed files:

- + debian/patches/0004-print-out-number-of-failing-test.patch
- debian/patches/series


Changes:

=====================================
debian/patches/0004-print-out-number-of-failing-test.patch
=====================================
@@ -0,0 +1,30 @@
+From: Martin Uecker <martin.uecker at med.uni-goettingen.de>
+Date: Mon, 25 Oct 2021 18:59:03 +0200
+Subject: print out number of failing test
+
+---
+ utests/utest.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/utests/utest.c b/utests/utest.c
+index bdeb19f..970592e 100644
+--- a/utests/utest.c
++++ b/utests/utest.c
+@@ -47,8 +47,15 @@ int main(int argc, char* argv[])
+ 	int num_tests_run = 0;
+ 	int num_tests_pass = 0;
+ 
+-	for (ut_test_f** ptr = &_utests_begin; ptr != &_utests_end; ptr++)
+-		UNUSED((num_tests_run++, (**ptr)()) && num_tests_pass++);
++	for (ut_test_f** ptr = &_utests_begin; ptr != &_utests_end; ptr++) {
++
++		num_tests_run++;
++
++		if (!(**ptr)())
++			debug_printf(DP_WARN, "Failed: %d\n", num_tests_run - 1);
++		else
++			num_tests_pass++;
++	}
+ 
+ 	bool good = (num_tests_pass == num_tests_run);
+ 


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
 0001-makefile-change-for-compatibility-with-debian.patch
 0002-remove-empty-directory.patch
 0003-deactivate-ode-unit-tests.patch
+0004-print-out-number-of-failing-test.patch



View it on GitLab: https://salsa.debian.org/med-team/bart/-/commit/293bc27d4a0653544c3226b6f0274326d547e387

-- 
View it on GitLab: https://salsa.debian.org/med-team/bart/-/commit/293bc27d4a0653544c3226b6f0274326d547e387
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20211025/f9bb5f40/attachment-0001.htm>


More information about the debian-med-commit mailing list