It would be useful for Wine development if we had an easy way to run the Mono testsuite on whichever CLI implementation happens to be set up in Wine (Mono or MS .NET). To this end, I've made a small proof-of-concept patch that adds a run-test-onwine target.
Note that I don't really understand most of this, and my approach was to search for "ondotnet", replace it with "onwine" and add "wine" to the start of the command line. Also, any tests that would normally be excluded on either Mono or .NET are excluded here, since we don't care about Mono-specific features in Wine. I haven't gotten this to run all the tests yet, but have I done anything obviously wrong?
diff --git a/build/Makefile b/build/Makefile index 69721f7..b55b039 100644 --- a/build/Makefile +++ b/build/Makefile @@ -4,7 +4,7 @@ include ../build/rules.make BUILT_FILES = common/Consts.cs -all-local install-local test-local run-test-local csproj-local run-test-ondotnet-local uninstall-local doc-update-local: $(BUILT_FILES) +all-local install-local test-local run-test-local csproj-local run-test-ondotnet-local run-test-onwine-local uninstall-local doc-update-local: $(BUILT_FILES) @: clean-local: diff --git a/build/executable.make b/build/executable.make index 6030f5e..03405ec 100644 --- a/build/executable.make +++ b/build/executable.make @@ -72,6 +72,8 @@ run-test-local: @: run-test-ondotnet-local: @: +run-test-onwine-local: + @: DISTFILES = $(sourcefile) $(base_prog_config) $(EXTRA_DISTFILES) diff --git a/build/library.make b/build/library.make index 7bf697e..58aa9df 100644 --- a/build/library.make +++ b/build/library.make @@ -166,7 +166,7 @@ endif # NO_INSTALL clean-local: -rm -f $(tests_CLEAN_FILES) $(library_CLEAN_FILES) $(CLEAN_FILES) -test-local run-test-local run-test-ondotnet-local: +test-local run-test-local run-test-ondotnet-local run-test-onwine-local: @: DISTFILES = $(wildcard *$(LIBRARY)*.sources) $(EXTRA_DISTFILES) diff --git a/build/rules.make b/build/rules.make index 08bdc22..81de3a5 100644 --- a/build/rules.make +++ b/build/rules.make @@ -122,7 +122,7 @@ gacutil = $(topdir)/class/lib/basic/gacutil.exe GACUTIL = MONO_PATH="$(topdir)/class/lib/basic$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(gacutil) endif -STD_TARGETS = test run-test run-test-ondotnet clean install uninstall doc-update +STD_TARGETS = test run-test run-test-ondotnet run-test-onwine clean install uninstall doc-update $(STD_TARGETS): %: do-% diff --git a/build/tests.make b/build/tests.make index 98e1eb8..0d7066c 100644 --- a/build/tests.make +++ b/build/tests.make @@ -57,20 +57,26 @@ check: run-test test-local: $(test_assemblies) run-test-local: run-test-lib run-test-ondotnet-local: run-test-ondotnet-lib +run-test-onwine-local: run-test-onwine-lib TEST_HARNESS_EXCLUDES = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)NotWorking,ValueAdd,CAS,InetAccess TEST_HARNESS_EXCLUDES_ONDOTNET = /exclude:$(PLATFORM_TEST_HARNESS_EXCLUDES)NotDotNet,CAS +TEST_HARNESS_EXCLUDES_ONWINE = /exclude:$(PLATFORM_TEST_HARNESS_EXCLUDES)NotWorking,NotDotNet,ValueAdd,CAS,InetAccess ifdef TEST_HARNESS_VERBOSE TEST_HARNESS_OUTPUT = -labels TEST_HARNESS_OUTPUT_ONDOTNET = -labels +TEST_HARNESS_OUTPUT_ONWINE = -labels TEST_HARNESS_POSTPROC = : TEST_HARNESS_POSTPROC_ONDOTNET = : +TEST_HARNESS_POSTPROC_ONWINE = : else TEST_HARNESS_OUTPUT = -output=TestResult-$(PROFILE).log TEST_HARNESS_OUTPUT_ONDOTNET = -output=TestResult-ondotnet-$(PROFILE).log +TEST_HARNESS_OUTPUT_ONWINE = -output=TestResult-onwine-$(PROFILE).log TEST_HARNESS_POSTPROC = (echo ''; cat TestResult-$(PROFILE).log) | sed '1,/^Tests run: /d'; xsltproc $(topdir)/build/nunit-summary.xsl TestResult-$(PROFILE).xml >> TestResult-$(PROFILE).log TEST_HARNESS_POSTPROC_ONDOTNET = (echo ''; cat TestResult-ondotnet-$(PROFILE).log) | sed '1,/^Tests run: /d'; xsltproc $(topdir)/build/nunit-summary.xsl TestResult-ondotnet-$(PROFILE).xml >> TestResult-ondotnet-$(PROFILE).log +TEST_HARNESS_POSTPROC_ONWINE = (echo ''; cat TestResult-onwine-$(PROFILE).log) | sed '1,/^Tests run: /d'; xsltproc $(topdir)/build/nunit-summary.xsl TestResult-onwine-$(PROFILE).xml >> TestResult-onwine-$(PROFILE).log endif ifdef FIXTURE @@ -91,6 +97,11 @@ run-test-ondotnet-lib: test-local ok=:; \ $(TEST_HARNESS) $(test_assemblies) -noshadow $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_ONDOTNET_FLAGS) $(TEST_HARNESS_EXCLUDES_ONDOTNET) $(TEST_HARNESS_OUTPUT_ONDOTNET) -xml=TestResult-ondotnet-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG) || ok=false; \ $(TEST_HARNESS_POSTPROC_ONDOTNET) ; $$ok + +run-test-onwine-lib: test-local + ok=:; \ + wine $(TEST_HARNESS) $(test_assemblies) -noshadow $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_ONWINE_FLAGS) $(TEST_HARNESS_EXCLUDES_ONWINE) $(TEST_HARNESS_OUTPUT_ONWINE) -xml=TestResult-onwine-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG) || ok=false; \ + $(TEST_HARNESS_POSTPROC_ONWINE) ; $$ok endif # test_assemblies TEST_FILES =
_______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list