Skip to content

Commit

Permalink
[tests] Write nunit/xunit exclude categories to a file (mono#14281)
Browse files Browse the repository at this point in the history
So we can include it in the SDKs archive.
  • Loading branch information
akoeplinger authored May 6, 2019
1 parent 3bb7f82 commit 4eea087
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mcs/build/tests.make
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ ifdef HAVE_CS_TESTS
test_assemblies += $(test_lib_output)

check: run-test
test-local: $(test_assemblies)
test-local: $(test_assemblies) $(test_lib_dir)/nunit-excludes.txt
run-test-local: run-test-lib
run-test-ondotnet-local: run-test-ondotnet-lib

Expand Down Expand Up @@ -244,6 +244,9 @@ else
TEST_HARNESS_EXEC=$(TEST_RUNTIME) $(TEST_RUNTIME_FLAGS) $(TEST_COVERAGE_FLAGS) $(AOT_RUN_FLAGS) $(TEST_HARNESS)
endif

$(test_lib_dir)/nunit-excludes.txt: $(topdir)/build/tests.make | $(test_lib_dir)
@echo "$(TEST_HARNESS_EXCLUDES)" > $@

## FIXME: i18n problem in the 'sed' command below
run-test-lib: test-local test-local-aot-compile copy-nunitlite-appconfig
ok=:; \
Expand Down Expand Up @@ -337,9 +340,12 @@ XTEST_COVERAGE_FLAGS = -O=-aot --profile=coverage:output=$(topdir)/class/lib/$(P
endif

check: run-xunit-test-local
xunit-test-local: $(xtest_lib_output)
xunit-test-local: $(xtest_lib_output) $(test_lib_dir)/xunit-excludes.txt
run-xunit-test-local: run-xunit-test-lib

$(test_lib_dir)/xunit-excludes.txt: $(topdir)/build/tests.make | $(test_lib_dir)
@echo "$(XTEST_TRAIT) $(XTEST_TRAIT_PLATFORM)" > $@

# cp -rf is a HACK for xunit runner to require xunit.execution.dOTNET.dll file in local folder on .net only
run-xunit-test-lib: xunit-test-local
@cp -rf $(XTEST_HARNESS_PATH)/xunit.execution.dotnet.dll $(test_lib_dir)/xunit.execution.dotnet.dll
Expand Down

0 comments on commit 4eea087

Please sign in to comment.