[clutter/msvc-support: 5/5] Enhance the creation of test bat files



commit b7fe0062b97232ab19c1a617ca4ff3afc479b7a7
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Jun 2 15:16:53 2011 +0800

    Enhance the creation of test bat files
    
    -Make a .bat for each applicable conform and interactive tests
    -Wrap these respective .bat files into the test-conformance.bat and
     test-interactive.bat and copy them into build/win32 during make
    -Dist the bats

 build/win32/Makefile.am       |    2 +-
 tests/conform/Makefile.am     |    7 +++++--
 tests/interactive/Makefile.am |    8 +++++---
 3 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/build/win32/Makefile.am b/build/win32/Makefile.am
index 13dbcdc..b764e59 100644
--- a/build/win32/Makefile.am
+++ b/build/win32/Makefile.am
@@ -1,3 +1,3 @@
 SUBDIRS = vs9 vs10
 
-EXTRA_DIST = test-conformance.bat test-interactive.bat
+EXTRA_DIST = *.bat
diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am
index af84b3a..82f0b33 100644
--- a/tests/conform/Makefile.am
+++ b/tests/conform/Makefile.am
@@ -122,11 +122,13 @@ stamp-test-conformance: Makefile $(srcdir)/test-conform-main.c
 		echo "  GEN    $$unit"; \
 		( echo "#!/bin/sh" ; echo "$(abs_builddir)/test-launcher.sh '$$i' \"\$$ \"" ) > $$unit$(SHEXT) ; \
 		( echo "#!/bin/sh" ; echo "exec $(abs_builddir)/test-conformance$(EXEEXT) -p $$i \"\$$ \"" ) > wrappers/$$unit$(SHEXT) ; \
-		( echo "test-conformance$(EXEEXT) -p $$i" ) >> $(top_srcdir)/build/win32/test-conformance.bat ; \
+		( echo "test-conformance$(EXEEXT) -p $$i" ) > $$unit.bat ; \
 		chmod +x $$unit$(SHEXT); \
 		chmod +x wrappers/$$unit$(SHEXT); \
 		echo "/$$unit$(SHEXT)" >> .gitignore; \
 	done \
+	&& ls *.bat > test-conformance.bat	\
+	&& cp *.bat $(top_srcdir)/build/win32/	\
 	&& echo timestamp > $(@F)
 
 clean-wrappers:
@@ -138,7 +140,8 @@ clean-wrappers:
 		rm -f wrappers/$$unit$(SHEXT) ; \
 	done \
 	&& rm -f unit-tests \
-	&& rm -f $(top_srcdir)/build/win32/test-conformance.bat \
+	&& rm -f $(top_srcdir)/build/win32/*.bat \
+	&& rm -f *.bat \
 	&& rm -f stamp-test-conformance
 
 # NB: BUILT_SOURCES here a misnomer. We aren't building source, just inserting
diff --git a/tests/interactive/Makefile.am b/tests/interactive/Makefile.am
index 931f11e..b288e27 100644
--- a/tests/interactive/Makefile.am
+++ b/tests/interactive/Makefile.am
@@ -98,9 +98,10 @@ stamp-test-interactive: Makefile test-interactive$(EXEEXT)
 		*.c)	test_bin=$${i%*.c} \
 			;; \
 		esac; \
-		( echo "test-interactive $$test_bin" ) >> $(top_srcdir)/build/win32/test-interactive.bat ; \
+		( echo "test-interactive $$test_bin" ) > $$test_bin.bat ; \
 	done \
-	&& echo timestamp > $(@F)
+	&& ls *.bat > test-interactive.bat	\
+	&& cp *.bat $(top_srcdir)/build/win32/
 
 clean-wrappers:
 	@for i in $(UNIT_TESTS); \
@@ -109,7 +110,8 @@ clean-wrappers:
 		echo "  RM    $$test_bin"; \
 		rm -f $$test_bin$(SHEXT); \
 	done \
-	&& rm -f $(top_srcdir)/build/win32/test-interactive.bat \
+	&& rm -f $(top_srcdir)/build/win32/*.bat \
+	&& rm -f *.bat \
 	&& rm -f stamp-test-interactive
 
 .PHONY: wrappers clean-wrappers



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