xamarin-macios/tests/generator/Makefile

22 строки
881 B
Makefile
Исходник Обычный вид История

TOP=../..
2016-05-26 16:06:52 +03:00
include $(TOP)/Make.config
[tests] Port the makefile-based generator tests to NUnit. (#3019) * [tests][generator] Port bindas1048error to NUnit. * [tests][generator] Port bindas1049error to NUnit. * [tests][generator] Port bindas1050modelerror to NUnit. * [tests][generator] Port bindas1050protocolerror to NUnit. * [tests][generator] Port bug42855 to NUnit. * [tests][generator] Port bug57070 to NUnit. * [tests][generator] Port bug52570classinternal to NUnit. * [tests][generator] Port bug52570methodinternal to NUnit. * [tests][generator] Port bug52570allowstaticmembers to NUnit. * [tests][generator] Port protocol-duplicate-abstract-error to NUnit. * [tests][generator] Port protocol-duplicate-method-diff-length to NUnit. * [tests][generator] Port protocol-duplicate-method-diff-out to NUnit. * [tests][generator] Port protocol-duplicate-method-diff-type to NUnit. * [tests][generator] Port protocol-duplicate-method-diff-return to NUnit. * [tests][generator] Port warnaserror to NUnit. * [tests][generator] Port nowarn to NUnit. * [tests][generator] Add support for inspecting/asserting the generated content. * [tests][generator] Port some Xamarin.Mac tests to NUnit. Ported: * bmac_smoke * bmac-with-hyphen-in-name * property-redefination-mac * NSApplicationPublicEnsureMethods * protocol-duplicate-abstract * [tests][generator] Point bgen to our local installation. * [tests][generator] Port the bug31788 test to a unit test. * [generator] Make the 'bgen' helper target more complete. * [tests][generator] Port non-custom iOS tests to unit tests. * [tests][generator] Add new test. * [tests][generator] Port the forum54078 test to a unit test. * [tests][generator] Port the desk63279 test to a unit test. * [tests][generator] Port the desk79124 test to a unit test. * [tests][generator] Port the multiple-api-definitions tests to unit tests. * [generator] Use mono code style. * [tests][generator] Port the bug29493 test to a unit test. * [tests][generator] Port the classNameCollision test to a unit test. * [tests][generator] Port the bi1036 test to a unit test. * [tests][generator] Port the bug37527 test to a unit test. Also fix BI1112 and BI1113 to show up as errors in the console output (since they're exceptions they're already treated as errors and would cause bgen to fail). * [tests][generator] Port the bug27986 test to a unit test. * [tests][generator] Port the bug35176 test to a unit test. * [tests][generator] Port the bi1046 test to a unit test. * [tests][generator] Port the virtualwrap test to a unit test. * [tests][generator] Port the bug42742 test to a unit test. * [tests][generator] Port the noasyncinternalwrapper test to a unit test. * [tests][generator] Port the noasyncwarningcs0219 test to a unit test. * [tests][generator] Port the bug53076 test to a unit test. * [tests][generator] Port the bug53076withmodel test to a unit test. * [tests][generator] Port the fieldenumtests test to a unit test. * [tests][generator] Port the smartenumwithframework test to a unit test. * [tests][generator] Port the forcedtype test to a unit test. * [tests][generator] Port the bug46292 test to a unit test. * [tests][generator] Build tests with MSBuild. There's no need to use xbuild for these tests. * [tests][generator] Remove dead code. * [xharness] Don't run the makefile-based generator tests anymore. Since there aren't any makefile-based generator tests anymore, they've all been ported to NUnit tests. * [tests][generator] Make the bug39614 test do what it was supposed to do: make sure a namespace isn't required (but recommended).
2017-11-20 16:55:16 +03:00
all-local:: run-unit-tests
build-unit-tests:
Bump VSMac to 8.1.0.2742 to fix msbuild issues (#6279) * Bump VSMac to 8.1.0.2742 to fix msbuild issues This is required to get the support for the msbuild `ToolsVersion` change from `15.0` to `Current`. * [tests][msbuild] Fix Binding resources test with updated msbuild Test failure with updated msbuild and vsmac 8.1: ``` Xamarin.iOS.Tasks.NativeReferencesNoEmbedding("iPhone").ShouldNotUnnecessarilyRebuildBindingProject(True) Binding project build did not create package? Expected: True But was: False at Xamarin.iOS.Tasks.NativeReferencesNoEmbedding.ShouldNotUnnecessarilyRebuildBindingProject (System.Boolean framework) [0x000a0] in <74b8f7d8a53e40109916d305bb4d7403>:0 at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&) at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo cul ture) [0x0006a] in <0519fa732e8845b6a809ce9180f541db>:0 ``` The test builds the project multiple times. Before the 3rd build, the project file's timestamp is updated and expects that the binding package will be rebuilt. But it is not, because the target `_CreateBindingResourcePackage` doesn't depend on that project file. So, add that to the target inputs. * [nuget] Use xibuild to run nuget Fix errors seen during `nuget restore` for tests: ``` Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xammac_tests/xammac_tests.csproj(213,3): error MSB4024: The imported project file "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets" could not be loaded. Could not find file "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets" ```
2019-06-19 08:07:27 +03:00
$(Q_XBUILD) $(SYSTEM_XIBUILD) -t -- /Library/Frameworks//Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore $(TOP)/src/generator.sln
$(SYSTEM_MSBUILD) generator-tests.csproj $(XBUILD_VERBOSITY)
run-unit-tests: build-unit-tests
rm -f .failed-stamp
$(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=After || touch $(CURDIR)/.failed-stamp
@# Create an html file and tell MonkeyWrench to upload it (if we're running there)
@[[ -z "$$BUILD_REPOSITORY" ]] || \
( xsltproc $(TOP)/tests/HtmlTransform.xslt TestResult.xml > index.html && \
echo "@MonkeyWrench: AddFile: $$PWD/index.html")
@[[ ! -e .failed-stamp ]]
2016-05-26 16:06:52 +03:00
clean-local::
[tests] Port the makefile-based generator tests to NUnit. (#3019) * [tests][generator] Port bindas1048error to NUnit. * [tests][generator] Port bindas1049error to NUnit. * [tests][generator] Port bindas1050modelerror to NUnit. * [tests][generator] Port bindas1050protocolerror to NUnit. * [tests][generator] Port bug42855 to NUnit. * [tests][generator] Port bug57070 to NUnit. * [tests][generator] Port bug52570classinternal to NUnit. * [tests][generator] Port bug52570methodinternal to NUnit. * [tests][generator] Port bug52570allowstaticmembers to NUnit. * [tests][generator] Port protocol-duplicate-abstract-error to NUnit. * [tests][generator] Port protocol-duplicate-method-diff-length to NUnit. * [tests][generator] Port protocol-duplicate-method-diff-out to NUnit. * [tests][generator] Port protocol-duplicate-method-diff-type to NUnit. * [tests][generator] Port protocol-duplicate-method-diff-return to NUnit. * [tests][generator] Port warnaserror to NUnit. * [tests][generator] Port nowarn to NUnit. * [tests][generator] Add support for inspecting/asserting the generated content. * [tests][generator] Port some Xamarin.Mac tests to NUnit. Ported: * bmac_smoke * bmac-with-hyphen-in-name * property-redefination-mac * NSApplicationPublicEnsureMethods * protocol-duplicate-abstract * [tests][generator] Point bgen to our local installation. * [tests][generator] Port the bug31788 test to a unit test. * [generator] Make the 'bgen' helper target more complete. * [tests][generator] Port non-custom iOS tests to unit tests. * [tests][generator] Add new test. * [tests][generator] Port the forum54078 test to a unit test. * [tests][generator] Port the desk63279 test to a unit test. * [tests][generator] Port the desk79124 test to a unit test. * [tests][generator] Port the multiple-api-definitions tests to unit tests. * [generator] Use mono code style. * [tests][generator] Port the bug29493 test to a unit test. * [tests][generator] Port the classNameCollision test to a unit test. * [tests][generator] Port the bi1036 test to a unit test. * [tests][generator] Port the bug37527 test to a unit test. Also fix BI1112 and BI1113 to show up as errors in the console output (since they're exceptions they're already treated as errors and would cause bgen to fail). * [tests][generator] Port the bug27986 test to a unit test. * [tests][generator] Port the bug35176 test to a unit test. * [tests][generator] Port the bi1046 test to a unit test. * [tests][generator] Port the virtualwrap test to a unit test. * [tests][generator] Port the bug42742 test to a unit test. * [tests][generator] Port the noasyncinternalwrapper test to a unit test. * [tests][generator] Port the noasyncwarningcs0219 test to a unit test. * [tests][generator] Port the bug53076 test to a unit test. * [tests][generator] Port the bug53076withmodel test to a unit test. * [tests][generator] Port the fieldenumtests test to a unit test. * [tests][generator] Port the smartenumwithframework test to a unit test. * [tests][generator] Port the forcedtype test to a unit test. * [tests][generator] Port the bug46292 test to a unit test. * [tests][generator] Build tests with MSBuild. There's no need to use xbuild for these tests. * [tests][generator] Remove dead code. * [xharness] Don't run the makefile-based generator tests anymore. Since there aren't any makefile-based generator tests anymore, they've all been ported to NUnit tests. * [tests][generator] Make the bug39614 test do what it was supposed to do: make sure a namespace isn't required (but recommended).
2017-11-20 16:55:16 +03:00
rm -Rf bin