diff --git a/tests/Makefile b/tests/Makefile index 956a29e568ac..3041ee6cfafe 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -333,3 +333,20 @@ package-test-libraries.zip: $(Q_GEN) cd $(TOP) && zip -9r --symlinks $(abspath $@).tmp ./tests/test-libraries $(Q_GEN) cd $(TOP) && find tests -regex 'tests/test-libraries/custom-type-assembly/.libs/.*dll' -exec zip -9r --symlinks $(abspath $@).tmp {} + $(Q) mv "$@".tmp "$@" + +build-all: + $(MAKE) build -C bgen + $(MAKE) build -C cecil-tests + $(MAKE) build -C dotnet/UnitTests + $(MAKE) build -C rgen + $(MAKE) build -C xtro-sharpie + $(MAKE) build-all -C "linker/ios/dont link/dotnet" + $(MAKE) build-all -C "linker/ios/link all/dotnet" + $(MAKE) build-all -C "linker/ios/link sdk/dotnet" + $(MAKE) build-all -C "linker/ios/trimmode copy/dotnet" + $(MAKE) build-all -C "linker/ios/trimmode link/dotnet" + $(MAKE) build-all -C fsharp/dotnet + $(MAKE) build-all -C interdependent-binding-projects/dotnet + $(MAKE) build-all -C introspection/dotnet + $(MAKE) build-all -C monotouch-test/dotnet + $(MAKE) build-all -C xcframework-test/dotnet diff --git a/tests/bgen/Makefile b/tests/bgen/Makefile index a53d187b6adb..4790e7ac8fd7 100644 --- a/tests/bgen/Makefile +++ b/tests/bgen/Makefile @@ -3,3 +3,6 @@ include $(TOP)/Make.config run-tests run-unit-tests: $(Q) $(DOTNET) test $(TEST_FILTER) bgen-tests.csproj + +build: + $(Q) $(DOTNET) build bgen-tests.csproj diff --git a/tests/framework-test/dotnet/Makefile b/tests/framework-test/dotnet/Makefile index c07acf79f160..14013316c0e3 100644 --- a/tests/framework-test/dotnet/Makefile +++ b/tests/framework-test/dotnet/Makefile @@ -1,8 +1,2 @@ TOP=../../.. include $(TOP)/Make.config - -build-all: - for platform in $(DOTNET_PLATFORMS); do \ - echo "Building in $$platform"; \ - $(MAKE) -C "$$platform" build; \ - done diff --git a/tests/fsharp/dotnet/Makefile b/tests/fsharp/dotnet/Makefile index c07acf79f160..6affa45ff122 100644 --- a/tests/fsharp/dotnet/Makefile +++ b/tests/fsharp/dotnet/Makefile @@ -1,8 +1,2 @@ TOP=../../.. -include $(TOP)/Make.config - -build-all: - for platform in $(DOTNET_PLATFORMS); do \ - echo "Building in $$platform"; \ - $(MAKE) -C "$$platform" build; \ - done +include $(TOP)/tests/common/shared-dotnet-test.mk diff --git a/tests/interdependent-binding-projects/dotnet/Makefile b/tests/interdependent-binding-projects/dotnet/Makefile new file mode 100644 index 000000000000..6affa45ff122 --- /dev/null +++ b/tests/interdependent-binding-projects/dotnet/Makefile @@ -0,0 +1,2 @@ +TOP=../../.. +include $(TOP)/tests/common/shared-dotnet-test.mk diff --git a/tests/linker/ios/trimmode copy/dotnet/Makefile b/tests/linker/ios/trimmode copy/dotnet/Makefile index a97c2cbb3d5d..07a44358c22d 100644 --- a/tests/linker/ios/trimmode copy/dotnet/Makefile +++ b/tests/linker/ios/trimmode copy/dotnet/Makefile @@ -1,2 +1,2 @@ -TOP=../../../.. +TOP=../../../../.. include $(TOP)/tests/common/shared-dotnet-test.mk diff --git a/tests/linker/ios/trimmode link/dotnet/Makefile b/tests/linker/ios/trimmode link/dotnet/Makefile index a97c2cbb3d5d..07a44358c22d 100644 --- a/tests/linker/ios/trimmode link/dotnet/Makefile +++ b/tests/linker/ios/trimmode link/dotnet/Makefile @@ -1,2 +1,2 @@ -TOP=../../../.. +TOP=../../../../.. include $(TOP)/tests/common/shared-dotnet-test.mk diff --git a/tests/rgen/Makefile b/tests/rgen/Makefile new file mode 100644 index 000000000000..d676915e4cb7 --- /dev/null +++ b/tests/rgen/Makefile @@ -0,0 +1,22 @@ +TOP=../.. +include $(TOP)/Make.config + +# Example TEST_FILTER: +# TEST_FILTER="--filter FullyQualifiedName~BuildMyCocoaApp" +# Docs: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test#filter-option-details + +build-bindings-analyzer-tests: + $(Q) $(DOTNET) build Microsoft.Macios.Bindings.Analyzer.Tests/Microsoft.Macios.Bindings.Analyzer.Tests.csproj $(DOTNET_BUILD_VERBOSITY) + +run-bindings-analyzer-tests: + $(Q) $(DOTNET) test Microsoft.Macios.Bindings.Analyzer.Tests/Microsoft.Macios.Bindings.Analyzer.Tests.csproj $(TEST_FILTER) + +build-generator-tests: + $(Q) $(DOTNET) build Microsoft.Macios.Generator.Tests/Microsoft.Macios.Generator.Tests.csproj $(DOTNET_BUILD_VERBOSITY) + +run-generator-tests: + $(Q) $(DOTNET) test Microsoft.Macios.Generator.Tests/Microsoft.Macios.Generator.Tests.csproj $(TEST_FILTER) + +build-all: build-bindings-analyzer-tests build-generator-tests + +run-tests run test: run-bindings-analyzer-tests run-generator-tests diff --git a/tests/xcframework-test/dotnet/Makefile b/tests/xcframework-test/dotnet/Makefile index c07acf79f160..6affa45ff122 100644 --- a/tests/xcframework-test/dotnet/Makefile +++ b/tests/xcframework-test/dotnet/Makefile @@ -1,8 +1,2 @@ TOP=../../.. -include $(TOP)/Make.config - -build-all: - for platform in $(DOTNET_PLATFORMS); do \ - echo "Building in $$platform"; \ - $(MAKE) -C "$$platform" build; \ - done +include $(TOP)/tests/common/shared-dotnet-test.mk