[json-glib/json-glib-0-12] build: Resync the GTest rules with upstream



commit 8b2d33e086277e08f3e24798f9b3453815137ecc
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Tue Oct 19 09:59:38 2010 +0100

    build: Resync the GTest rules with upstream
    
    Upstream GLib fixed the test rules to avoid repeating the test suite
    three times.
    (cherry picked from commit 20a16d5b9ecabe68ee18655b2ff3bdb17136c6f1)
    
    Signed-off-by: Emmanuele Bassi <ebassi linux intel com>

 build/autotools/Makefile.am.gtest |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/build/autotools/Makefile.am.gtest b/build/autotools/Makefile.am.gtest
index eae0a68..f847599 100644
--- a/build/autotools/Makefile.am.gtest
+++ b/build/autotools/Makefile.am.gtest
@@ -10,12 +10,16 @@ TEST_PROGS =
 ### testing rules
 
 # test: run all tests in cwd and subdirs
-test:	${TEST_PROGS}
+test: test-nonrecursive
+	@for subdir in $(SUBDIRS) . ; do \
+	  test "$$subdir" = "." -o "$$subdir" = "po" || \
+	  ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
+	done
+
+# test-nonrecursive: run tests only in cwd
+test-nonrecursive: ${TEST_PROGS}
 	@test -z "${TEST_PROGS}" || ${GTESTER} --verbose ${TEST_PROGS}
-	@ for subdir in $(SUBDIRS) . ; do \
-	    test "$$subdir" = "." -o "$$subdir" = "po" || \
-	    ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
-	  done
+
 # test-report: run tests in subdirs and generate report
 # perf-report: run tests in subdirs with -m perf and generate report
 # full-report: like test-report: with -m perf and -m slow
@@ -56,8 +60,7 @@ test-report perf-report full-report:	${TEST_PROGS}
 	    rm -rf "$$GTESTER_LOGDIR"/ ; \
 	    ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $  xml >$  html ; \
 	  }
+.PHONY: test test-report perf-report full-report test-nonrecursive
 
-.PHONY: test test-report perf-report full-report
-
-# run make test as part of make check
-check-local: test
+# run tests in cwd as part of make check
+check-local: test-nonrecursive



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]