[gmime/gmime-2-4] Fixed test suite to abort make on fail.



commit bfab0c41deb2d5df62ccf4376872cdb718cc3801
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 9274c8c..1c8fe0b 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 5b78d32..40fe25b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -130,4 +130,5 @@ 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
diff --git a/tests/testsuite.c b/tests/testsuite.c
index 4ae686c..0b609a1 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]