Skip to content

Commit 621bf6c

Browse files
authored
[tests] Fix running several test suites from the command line. Fixes xamarin/maccore@2279. (dotnet#9348)
Fixes xamarin/maccore#2279
1 parent 9fda2c6 commit 621bf6c

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

tests/generator/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ build-unit-tests:
1010

1111
run-unit-tests: build-unit-tests
1212
rm -f .failed-stamp
13-
$(SYSTEM_MONO) --debug $(XIBUILD_EXE_PATH) -t -- $(TOP)/packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe $(abspath $(TOP)/tests/generator/bin/Debug/generator-tests.dll) "--result=$(abspath $(CURDIR)/TestResult.xml);format=nunit2" $(TEST_FIXTURE) --labels=All || touch $(CURDIR)/.failed-stamp
13+
$(TOP)/tools/nunit3-console-3.11.1 $(abspath $(TOP)/tests/generator/bin/Debug/generator-tests.dll) "--result=$(abspath $(CURDIR)/TestResult.xml);format=nunit2" $(TEST_FIXTURE) --labels=All || touch $(CURDIR)/.failed-stamp
1414
@# Create an html file and tell MonkeyWrench to upload it (if we're running there)
1515
@[[ -z "$$BUILD_REPOSITORY" ]] || \
1616
( xsltproc $(TOP)/tests/HtmlTransform.xslt TestResult.xml > index.html && \

tests/mmptest/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ endif
2929

3030
run: build
3131
rm -f .failed-stamp
32-
$(SYSTEM_MONO) --debug $(XIBUILD_EXE_PATH) -t -- $(TOP)/packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe $(abspath $(TOP)/tests/mmptest/bin/Debug/mmptest.dll) "--result=$(abspath $(CURDIR)/TestResult.xml);format=nunit2" $(TEST_FIXTURE) --labels=All || touch $(CURDIR)/.failed-stamp
32+
$(TOP)/tools/nunit3-console-3.11.1 $(abspath $(TOP)/tests/mmptest/bin/Debug/mmptest.dll) "--result=$(abspath $(CURDIR)/TestResult.xml);format=nunit2" $(TEST_FIXTURE) --labels=All || touch $(CURDIR)/.failed-stamp
3333
@# Create an html file and tell MonkeyWrench to upload it (if we're running there)
3434
@[[ -z "$$BUILD_REPOSITORY" ]] || \
3535
( xsltproc $(TOP)/tests/HtmlTransform.xslt TestResult.xml > index.html && \

tests/mtouch/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ export MSBuildExtensionsPathFallbackPathsOverride=$(IOS_DESTDIR)/Library/Framewo
99

1010
check: run-tests
1111

12-
NUNIT_MSBUILD_DIR=$(TOP)/packages/NUnit.ConsoleRunner.3.9.0/tools/
13-
1412
all-local::
1513
$(MAKE) dependencies
1614
$(MAKE) run-tests
@@ -22,7 +20,7 @@ all-local::
2220

2321
run-tests: bin/Debug/mtouch.dll test.config
2422
rm -f .failed-stamp
25-
$(SYSTEM_MONO) --debug $(TOP)/packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe "$(abspath $<)" "--result=$(abspath $(CURDIR)/TestResult.xml);format=nunit2" $(TEST_FIXTURE) --labels=All --inprocess || touch $(CURDIR)/.failed-stamp
23+
$(TOP)/tools/nunit3-console-3.11.1 "$(abspath $<)" "--result=$(abspath $(CURDIR)/TestResult.xml);format=nunit2" $(TEST_FIXTURE) --labels=All --inprocess || touch $(CURDIR)/.failed-stamp
2624
@# Create an html file and tell MonkeyWrench to upload it (if we're running there)
2725
@[[ -z "$$BUILD_REPOSITORY" ]] || \
2826
( xsltproc $(TOP)/tests/HtmlTransform.xslt TestResult.xml > index.html && \

tests/sampletester/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ TOP=../..
22

33
include $(TOP)/Make.config
44

5-
NUNIT_MSBUILD_DIR=$(TOP)/packages/NUnit.ConsoleRunner.3.9.0/tools/
6-
75
all-local:: run-tests
86

97
ifneq ($(TEST_CATEGORY),)
@@ -16,7 +14,7 @@ build: bin/Debug/sampletester.dll
1614

1715
run-tests: bin/Debug/sampletester.dll
1816
$(Q) rm -f .failed-stamp
19-
$(Q) $(SYSTEM_MONO) --debug $(NUNIT_MSBUILD_DIR)/nunit3-console.exe $(WHERE_CONDITION) $(abspath $(CURDIR)/bin/Debug/sampletester.dll) "--result=$(abspath $(CURDIR)/$(TEST_RESULT).xml)" $${TEST_FIXTURE:+"$$TEST_FIXTURE"} --labels=All --inprocess || touch $(CURDIR)/.failed-stamp
17+
$(Q) $(TOP)/tools/nunit3-console-3.11.1 $(WHERE_CONDITION) $(abspath $(CURDIR)/bin/Debug/sampletester.dll) "--result=$(abspath $(CURDIR)/$(TEST_RESULT).xml)" $${TEST_FIXTURE:+"$$TEST_FIXTURE"} --labels=All --inprocess || touch $(CURDIR)/.failed-stamp
2018
$(Q) xsltproc HtmlReport.xslt "$(TEST_RESULT).xml" > "$(TEST_RESULT).html"
2119
$(Q) $(CP) "$(TEST_RESULT).html" index.html
2220
@[[ ! -e .failed-stamp ]]

0 commit comments

Comments
 (0)