summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Degrande <samuel.degrande@lifl.fr>2011-03-25 12:49:44 +0100
committerEmmanuele Bassi <ebassi@linux.intel.com>2011-04-01 17:08:25 +0100
commit4594d1bafe835d1fa68e04564528a497d259d7dc (patch)
tree582c5bef8b9aadc4d7b6a44b1112caf7de67c872
parent564765c45c8f6a9d53cb21857887048c7c28d63b (diff)
downloadclutter-4594d1bafe835d1fa68e04564528a497d259d7dc.tar.gz
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
-rw-r--r--configure.ac1
-rw-r--r--tests/conform/Makefile.am20
-rw-r--r--tests/interactive/Makefile.am14
3 files changed, 24 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 7dfdc63f8..3891670af 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 b86c9fa41..fa00dc8b9 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 85c1e15bb..5c04bf61e 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