[clutter] Removes the addition of the .exe extension to unit-test scripts, on win32.



commit 4594d1bafe835d1fa68e04564528a497d259d7dc
Author: Samuel Degrande <samuel degrande lifl fr>
Date:   Fri Mar 25 12:49:44 2011 +0100

    Removes the addition of the .exe extension to unit-test scripts, on win32.
    
    On win32, test scripts are created with a .exe extension.
    Under mingw, a .exe script is launched in 16 bit compatibility mode (through
    ntvdm), and so it just does not run.
    
    http://bugzilla.clutter-project.org/show_bug.cgi?id=2619

 configure.ac                  |    1 +
 tests/conform/Makefile.am     |   20 +++++++++++++-------
 tests/interactive/Makefile.am |   14 ++++++++++----
 3 files changed, 24 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7dfdc63..3891670 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,6 +91,7 @@ AS_CASE([$host],
         [platform_win32=no]
 )
 AC_MSG_RESULT([$platform_win32])
+AM_CONDITIONAL(OS_WIN32, [test "$platform_win32" = "yes"])
 
 AC_SUBST(CLUTTER_LT_VERSION)
 AC_SUBST(CLUTTER_LT_LDFLAGS)
diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am
index b86c9fa..fa00dc8 100644
--- a/tests/conform/Makefile.am
+++ b/tests/conform/Makefile.am
@@ -86,6 +86,12 @@ units_sources += \
 
 test_conformance_SOURCES = $(common_sources) $(units_sources)
 
+if OS_WIN32
+SHEXT =
+else
+SHEXT = $(EXEEXT)
+endif
+
 # For convenience, this provides a way to easily run individual unit tests:
 .PHONY: wrappers clean-wrappers
 
@@ -113,11 +119,11 @@ stamp-test-conformance: Makefile $(srcdir)/test-conform-main.c
 	do \
 		unit=`basename $$i | sed -e s/_/-/g`; \
 		echo "  GEN    $$unit"; \
-		( echo "#!/bin/sh" ; echo "$(abs_builddir)/test-launcher.sh '$$i' \"\$$ \"" ) > $$unit$(EXEEXT) ; \
-		( echo "#!/bin/sh" ; echo "exec $(abs_builddir)/test-conformance$(EXEEXT) -p $$i \"\$$ \"" ) > wrappers/$$unit$(EXEEXT) ; \
-		chmod +x $$unit$(EXEEXT); \
-		chmod +x wrappers/$$unit$(EXEEXT); \
-		echo "/$$unit$(EXEEXT)" >> .gitignore; \
+		( 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) ; \
+		chmod +x $$unit$(SHEXT); \
+		chmod +x wrappers/$$unit$(SHEXT); \
+		echo "/$$unit$(SHEXT)" >> .gitignore; \
 	done \
 	&& echo timestamp > $(@F)
 
@@ -126,8 +132,8 @@ clean-wrappers:
 	do \
 		unit=`basename $$i | sed -e s/_/-/g`; \
 		echo "  RM     $$unit"; \
-		rm -f $$unit$(EXEEXT) ; \
-		rm -f wrappers/$$unit$(EXEEXT) ; \
+		rm -f $$unit$(SHEXT) ; \
+		rm -f wrappers/$$unit$(SHEXT) ; \
 	done \
 	&& rm -f unit-tests \
 	&& rm -f stamp-test-conformance
diff --git a/tests/interactive/Makefile.am b/tests/interactive/Makefile.am
index 85c1e15..5c04bf6 100644
--- a/tests/interactive/Makefile.am
+++ b/tests/interactive/Makefile.am
@@ -61,6 +61,12 @@ if X11_TESTS
 UNIT_TESTS += test-pixmap.c test-devices.c
 endif
 
+if OS_WIN32
+SHEXT =
+else
+SHEXT = $(EXEEXT)
+endif
+
 # For convenience, this provides a way to easily run individual unit tests:
 wrappers: stamp-test-interactive
 	@true
@@ -77,9 +83,9 @@ stamp-test-interactive: Makefile test-interactive$(EXEEXT)
 		echo "  GEN    $$test_bin" ; \
 		( echo "#!/bin/sh" ; \
 		  echo "$$wrapper $$test_bin \$$@" \
-		) > $$test_bin$(EXEEXT) ; \
-		chmod +x $$test_bin$(EXEEXT) ; \
-		echo "/$$test_bin$(EXEEXT)" >> .gitignore ; \
+		) > $$test_bin$(SHEXT) ; \
+		chmod +x $$test_bin$(SHEXT) ; \
+		echo "/$$test_bin$(SHEXT)" >> .gitignore ; \
 	done \
 	&& echo timestamp > $(@F)
 
@@ -88,7 +94,7 @@ clean-wrappers:
 	do \
 		test_bin=$${i%*.c} ; \
 		echo "  RM    $$test_bin"; \
-		rm -f $$test_bin$(EXEEXT); \
+		rm -f $$test_bin$(SHEXT); \
 	done \
 	&& rm -f stamp-test-interactive
 



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