xamarin-macios/tests/mmp-aot-tests/Makefile

39 строки
1.2 KiB
Makefile
Исходник Обычный вид История

TOP=../..
include $(TOP)/Make.config
PACKAGE_PATH = $(TOP)/packages
NUGET_CONSOLE = $(PACKAGE_PATH)/NUnit.Runners.2.6.4/tools/nunit-console.exe
NUGET_LIB = $(PACKAGE_PATH)/NUnit.2.6.4/lib/nunit.framework.dll
CECIL_LIB = $(PACKAGE_PATH)/Mono.Cecil.0.10.3/lib/net40/Mono.Cecil.dll
test_sources = \
aot.cs \
$(TOP)/tools/common/StringUtils.cs
ifdef INCLUDE_MAC
all-local:: run
endif
run:: tests.dll $(NUGET_CONSOLE)
$(Q_NUNIT) mono --runtime=v4.0 $(NUGET_CONSOLE) -noshadow -nologo tests.dll
$(TOP)/tools/mmp/bin/Release/mmp.exe:
$(Q) $(MAKE) -C $(TOP)/tools/mmp
mmp.exe: $(TOP)/tools/mmp/bin/Release/mmp.exe
$(Q) $(CP) $< $@
nunit.framework.dll nunit-console.exe Mono.Cecil.dll:
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
$(SYSTEM_XIBUILD) -t -- /Library/Frameworks//Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore packages.config
$(CP) $(NUGET_LIB) nunit.framework.dll
$(CP) $(CECIL_LIB) Mono.Cecil.dll
tests.dll: $(test_sources) mmp.exe nunit.framework.dll Mono.Cecil.dll
$(Q_CSC) $(SYSTEM_CSC) $(test_sources) -r:mmp.exe -t:library -out:tests.dll -r:nunit.framework.dll -r:Mono.Cecil.dll -debug
clean-local::
rm -f tests.dll
rm -f tests.dll.mdb
rm -f nunit.framework.dll
rm -f TestResult.xml