[PATCH] Run the testssuite also on unix

Detlef Riekenberg wine.dev@web.de
Sun Jul 31 22:38:00 GMT 2011


Hi.

While building pthreads-win32 on my system (linux), i missed the option
to run the tests with wine.

Patches for tests/GNUmakefile and tests/Makefile are attached.

Example useage:

make RUN=wine CROSS=i386-mingw32msvc- clean GC


-- 
By by ... Detlef

-------------- next part --------------
--- pthreads.org/tests/GNUmakefile	2011-07-03 05:54:34.000000000 +0200
+++ pthreads/tests/GNUmakefile	2011-07-30 00:59:18.264551042 +0200
@@ -52,6 +52,10 @@
 CXX     = $(CROSS)g++
 RANLIB  = $(CROSS)ranlib
 
+# For cross testing use e.g.
+# # make RUN=wine CROSS=i386-mingw32msvc- clean GC
+RUN     =
+
 #
 # Mingw32
 #
@@ -380,20 +384,20 @@
 
 sizes.pass: sizes.exe
 	@ $(ECHO) Running $*
-	./$< > SIZES.$(TEST)
+	@ $(RUN) ./$< > SIZES.$(TEST)
 	@ $(CAT) SIZES.$(TEST)
 	@ $(ECHO) Passed
 	@ $(TOUCH) $@
 
 %.pass: %.exe
 	@ $(ECHO) Running $*
-	./$*
+	@ $(RUN) ./$*
 	@ $(ECHO) Passed
 	@ $(TOUCH) $@
 
 %.bench: $(LIB) $(DLL) $(HDR) $(QAPC) $(XXLIBS) %.exe
 	@ $(ECHO) Running $*
-	./$*
+	@ $(RUN) ./$*
 	@ $(ECHO) Done
 	@ $(TOUCH) $@
 
-------------- next part --------------
--- pthreads.org/tests/Makefile	2011-07-03 16:15:59.000000000 +0200
+++ pthreads/tests/Makefile	2011-07-30 01:03:55.214548402 +0200
@@ -39,6 +39,9 @@
 MKDIR	= mkdir
 TOUCH	= echo Passed >
 ECHO	= echo
+# For cross testing use e.g.
+# # make RUN=wine CROSS=i386-mingw32msvc- clean GC
+RUN     =
 
 # The next path is relative to $BUILD_DIR
 QAPC	= # ..\QueueUserAPCEx\User\quserex.dll
@@ -210,26 +213,26 @@
 
 sizes.pass: sizes.exe
 	@ $(ECHO) ... Running $(TEST)$(DLL_VER) test: $*.exe
-	@ .\$*.exe > SIZES.$(TEST)
+	@ $(RUN) .\$*.exe > SIZES.$(TEST)
 	@ $(CAT) SIZES.$(TEST)
 	@ $(ECHO) ...... Passed
 	@ $(TOUCH) $*.pass
 
 $(REGULAR_PASSES): $*.exe
 	@ $(ECHO) ... Running $(TEST) test: $*.exe
-	@ .\$*.exe
+	@ $(RUN) .\$*.exe
 	@ $(ECHO) ...... Passed
 	@ $(TOUCH) $*.pass
 
 $(BENCHRESULTS): $*.exe
 	@ $(ECHO) ... Running $(TEST) benchtest: $*.exe
-	@ .\$*.exe
+	@ $(RUN) .\$*.exe
 	@ $(ECHO) ...... Done
 	@ $(TOUCH) $*.bench
 
 $(STRESSRESULTS): $*.exe
 	@ $(ECHO) ... Running $(TEST) stresstest: $*.exe
-	@ .\$*.exe
+	@ $(RUN) .\$*.exe
 	@ $(ECHO) ...... Done
 	@ $(TOUCH) $*.pass
 


More information about the Pthreads-win32 mailing list