diff --git a/Makefile b/Makefile index 889d3bfff..925c704bc 100644 --- a/Makefile +++ b/Makefile @@ -139,11 +139,7 @@ shell: define RUN_TEST MONO_TRACE_LISTENER=Console.Out \ JAVA_INTEROP_GREF_LOG=g-$(basename $(notdir $(1))).txt $(if $(2),JAVA_INTEROP_LREF_LOG=l-$(basename $(notdir $(1))).txt,) \ - $(RUNTIME) $$MONO_OPTIONS --runtime=v4.0.0 \ - $(NUNIT_CONSOLE) $(NUNIT_EXTRA) $(1) \ - $(if $(RUN),-run:$(RUN)) \ - -xml=TestResult-$(basename $(notdir $(1))).xml \ - -output=bin/Test$(CONFIGURATION)/TestOutput-$(basename $(notdir $(1))).txt ; + $(MSBUILD) $(MSBUILD_FLAGS) build-tools/scripts/RunNUnitTests.targets /p:TestAssembly=$(1) ; endef run-tests: $(TESTS) bin/Test$(CONFIGURATION)/$(JAVA_INTEROP_LIB) diff --git a/build-tools/scripts/RunNUnitTests.targets b/build-tools/scripts/RunNUnitTests.targets new file mode 100644 index 000000000..5eb67c90a --- /dev/null +++ b/build-tools/scripts/RunNUnitTests.targets @@ -0,0 +1,22 @@ + + + + Debug + <_TopDir>$(MSBuildThisFileDirectory)..\.. + <_Runtime Condition=" '$(RUNTIME)' != '' ">$(RUNTIME) + <_Runtime Condition=" '$(RUNTIME)' == '' And '$(OS)' != 'Windows_NT' ">mono + <_NUnit>$(_Runtime) packages\NUnit.Runners.2.6.3\tools\nunit-console.exe + <_Run Condition=" '$(RUN)' != '' ">--run="$(RUN)" + + + <_TestAssembly Include="$(_TopDir)\bin\Test$(Configuration)\*-*Tests.dll" Condition=" '$(TestAssembly)' == '' " /> + <_TestAssembly Include="$(TestAssembly)" Condition=" '$(TestAssembly)' != '' " /> + + + + + \ No newline at end of file