X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b6e3f2b55742279bfb7deeb3b79cf56eb82740bb..3111b4d9bcae48261dfa4990fcc27ea9e7a7f0aa:/src/xbt/cunit.c?ds=sidebyside diff --git a/src/xbt/cunit.c b/src/xbt/cunit.c index 717b4e1a3b..ab53a53787 100644 --- a/src/xbt/cunit.c +++ b/src/xbt/cunit.c @@ -308,12 +308,14 @@ static int xbt_test_suite_run(xbt_test_suite_t suite) { (test->failed?" FAIL":" PASS"))), test->title, file, line); - xbt_dynar_foreach(test->logs,it_log,log) { - file = (log->file != NULL ? log->file : file); - line = (log->line != 0 ? log->line : line); - fprintf(stderr, " %s:%d: %s\n", - file, line,log->text); - + if ( (test->expected_failure && !test->failed) || (!test->expected_failure && test->failed) ) { + xbt_dynar_foreach(test->logs,it_log,log) { + file = (log->file != NULL ? log->file : file); + line = (log->line != 0 ? log->line : line); + fprintf(stderr, " %s:%d: %s\n", + file, line,log->text); + + } } } fprintf(stderr, " Summary: %d of %d tests failed",unit->test_failed, unit->nb_tests);