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 <[email protected]>
+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.


_______________________________________________
debian-med-commit mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to