[gmime] Fixed test suite to abort make on fail.
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] Fixed test suite to abort make on fail.
- Date: Thu, 5 Jan 2012 16:06:12 +0000 (UTC)
commit 77e116116fb9bb728beca89b01fcd9ce433dbe8f
Author: Jeffrey Stedfast <jeff xamarin com>
Date: Thu Jan 5 11:05:34 2012 -0500
Fixed test suite to abort make on fail.
2012-01-05 Jeffrey Stedfast <jeff xamarin com>
Fixes for bug #667137.
* tests/Makefile.am: If any tests fail, exit with an error to abort make.
* tests/testsuite.c (testsuite_exit): Simply return
total_errors.
ChangeLog | 9 +++++++++
tests/Makefile.am | 1 +
tests/testsuite.c | 7 +------
3 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a9abaf6..96be375 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-01-05 Jeffrey Stedfast <jeff xamarin com>
+
+ Fixes for bug #667137.
+
+ * tests/Makefile.am: If any tests fail, exit with an error to abort make.
+
+ * tests/testsuite.c (testsuite_exit): Simply return
+ total_errors.
+
2012-01-05 Jeffrey Stedfast <fejj gnome org>
Fixes for bug #667072.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e0f88a3..481f168 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -139,6 +139,7 @@ check-local: $(AUTOMATED_TESTS)
echo "Results: $${passed} tests passed; $${failed} tests failed."; \
if [ $${failed} -ne 0 ]; then \
echo -e "Failed tests: $${failed_tests}"; \
+ exit -1; \
fi
distclean-local:
diff --git a/tests/testsuite.c b/tests/testsuite.c
index 0d8bacd..cc1c735 100644
--- a/tests/testsuite.c
+++ b/tests/testsuite.c
@@ -112,12 +112,7 @@ testsuite_init (int argc, char **argv)
int
testsuite_exit (void)
{
- if (total_errors > 0)
- return total_errors;
- else if (total_tests > 0)
- return 0;
-
- return EXIT_FAILURE;
+ return total_errors;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]