xamarin-macios/tests/package-mac-tests.sh

93 строки
3.1 KiB
Bash
Исходник Обычный вид История

2016-05-26 16:06:52 +03:00
#!/bin/bash -ex
cd "$(dirname "${BASH_SOURCE[0]}")"
# Clone files instead of copying them on APFS file systems. Much faster.
CP="cp"
if df -t apfs / >/dev/null 2>&1; then
CP="cp -c"
fi
2016-05-26 16:06:52 +03:00
#git clean -xfdq
DIR=$(pwd)/mac-test-package/mac-test-package
rm -Rf "$DIR"
mkdir -p "$DIR"
2016-05-26 16:06:52 +03:00
make test.config
cat test.config
INCLUDE_XAMARIN_LEGACY=$(grep ^INCLUDE_XAMARIN_LEGACY= test.config | sed 's/.*=//')
INCLUDE_MAC=$(grep ^INCLUDE_MAC= test.config | sed 's/.*=//')
INCLUDE_MACCATALYST=$(grep ^INCLUDE_MACCATALYST= test.config | sed 's/.*=//')
XCODE_DEVELOPER_ROOT=$(grep ^XCODE_DEVELOPER_ROOT= test.config | sed 's/.*=//')
MAC_DESTDIR=$(grep ^MAC_DESTDIR= test.config | sed 's/.*=//')
export MD_APPLE_SDK_ROOT="$(dirname "$(dirname "$XCODE_DEVELOPER_ROOT")")"
export XAMMAC_FRAMEWORK_PATH=$MAC_DESTDIR/Library/Frameworks/Xamarin.Mac.framework/Versions/Current
export XamarinMacFrameworkRoot=$MAC_DESTDIR/Library/Frameworks/Xamarin.Mac.framework/Versions/Current
export TargetFrameworkFallbackSearchPaths=$MAC_DESTDIR/Library/Frameworks/Mono.framework/External/xbuild-frameworks
export MSBuildExtensionsPathFallbackPathsOverride=$MAC_DESTDIR/Library/Frameworks/Mono.framework/External/xbuild
make
make .stamp-xharness-configure
if test -n "$INCLUDE_XAMARIN_LEGACY"; then
../tools/xibuild/xibuild -- /r ../external/Touch.Unit/Touch.Client/macOS/mobile/Touch.Client-macOS-mobile.csproj
../tools/xibuild/xibuild -- /r ../external/Touch.Unit/Touch.Client/macOS/full/Touch.Client-macOS-full.csproj
../tools/xibuild/xibuild -- /r bindings-test/macOS/bindings-test.csproj
fi
TEST_SUITE_DEPENDENCIES+=(bindings-test)
TEST_SUITE_DEPENDENCIES+=(EmbeddedResources)
TEST_SUITE_DEPENDENCIES+=(fsharplibrary)
TEST_SUITE_DEPENDENCIES+=(BundledResources)
for dep in "${TEST_SUITE_DEPENDENCIES[@]}"; do
if test -n "$INCLUDE_MAC"; then
make -C "$dep"/dotnet/macOS build
fi
if test -n "$INCLUDE_MACCATALYST"; then
make -C "$dep"/dotnet/MacCatalyst build
fi
done
TEST_SUITES+=(build-dontlink)
TEST_SUITES+=(build-linksdk)
TEST_SUITES+=(build-linkall)
TEST_SUITES+=(build-introspection)
if test -n "$INCLUDE_XAMARIN_LEGACY"; then
TEST_SUITES+=(build-xammac_tests)
fi
TEST_SUITES+=(build-monotouch-test)
if test -n "$BUILD_REVISION"; then
MAKE_FLAGS=-j
fi
make -f packaged-macos-tests.mk "${TEST_SUITES[@]}" $MAKE_FLAGS
2016-05-26 16:06:52 +03:00
if test -n "$INCLUDE_XAMARIN_LEGACY"; then
for app in */bin/x86/*/*.app linker/mac/*/bin/x86/*/*.app linker/mac/*/generated-projects/*/bin/x86/*/*.app introspection/Mac/bin/x86/*/*.app; do
mkdir -p "$DIR/tests/$app"
$CP -R "$app" "$DIR/tests/$app/.."
done
fi
2016-05-26 16:06:52 +03:00
for app in linker/*/*/dotnet/*/bin/*/*/*/*.app */dotnet/*/bin/*/*/*/*.app; do
mkdir -p "$DIR/tests/$app"
$CP -R "$app" "$DIR/tests/$app/.."
done
$CP -p packaged-macos-tests.mk "$DIR/tests"
$CP -p run-with-timeout.* "$DIR/tests"
$CP -p ../Make.config "$DIR"
$CP -p ../Make.versions "$DIR"
$CP -p test-dependencies.sh "$DIR"
$CP -p ../system-dependencies.sh "$DIR"
$CP -p ../configure.inc "$DIR"
mkdir -p "$DIR/mk"
$CP -p ../mk/subdirs.mk "$DIR/mk"
$CP -p ../mk/rules.mk "$DIR/mk"
$CP -p ../mk/quiet.mk "$DIR/mk"
Bump to mono:2019-06 (#6196) * Use the commonly used casing for `MSBuildSDKsPath` property Handle "incorrectly" cased msbuild property names msbuild property names are case insensitive. While generating the custom app.config, in `SetToolsetProperty(..)` we try to update the property if it already exists. But the name lookup was case sensitive, thus causing the lookup to fail, resulting in two entries for the same property name differing only in case. Eg. `MSBuildSDKsPath` vs `MSBuildSdksPath`. * [mtouch] Whitelist new Brotli native symbols in Xamarin.Tests.Misc.PublicSymbols test * [mtouch] Better assert in NoLLVMFailuresInWatchOS() test We'd list the "LLVM failed" messages before even though the AOT might've crashed and the list is meaningless. Assert the exit code before that. * [mtouch] Use new LLVM even for 32bit targets See https://github.com/mono/mono/issues/14841 and https://github.com/mono/mono/issues/9621 * [mtouch] Work around slow LLVM in "don't link" test See https://github.com/mono/mono/issues/14843 * Remove useless conditional * Remove LLVM36 from Makefile * [watch4] set right min version for arm64_32 based watch devices (#6307) Fixes the confusion around `libmono-native*` (see for example https://github.com/xamarin/xamarin-macios/commit/ce5ba1e41d526eddd9b61f68fae22a747831e9f2#commitcomment-33834491 ) when building with `MONO_BUILD_FROM_SOURCE=1`. * reflect watchos64_32_version_min change from mono sdk * Move mono hash info to mk/mono.mk so that existing scripts work. * Add Makefile dependency on mono.mk where necessary With https://github.com/xamarin/xamarin-macios/commit/3e7bc29adec8dff3558c284a3050f2db36ea3cf2 the Mono hash was moved from Make.config to mono.mk. We need to add a Makefile dependency on this file wherever Make.config was used to track a Mono dependency. * [tests] Copy mk/mono.mk to the XM test package. * [tests] Update minOS version test after consolidating min watchOS versions everywhere. Fixes this mtouch and mmptest failure: 1) Failed : Xamarin.Tests.ProductTests.MinOSVersion(watchOS,MinwatchOS,WatchOSSimulator,False) Failures Expected: <empty> But was: < "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (mono-runtime-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (bindings-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (bindings-generated-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (shared-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (runtime-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-invoke-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (xamarin-support-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (nsstring-localization-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-varargs-debug.arm64_32.o)."... > * [mmp] Fix make clean target It needs an -r to remove directories: ``` rm: bin: is a directory rm: obj: is a directory ``` * Add new xamarin_timezone_get_local_name() to a few more places
2019-07-16 18:24:00 +03:00
$CP -p ../mk/mono.mk "$DIR/mk"
2016-05-26 16:06:52 +03:00
cd mac-test-package && 7z a ../mac-test-package.7z ./*