Граф коммитов

36 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge c31e4a8dda
[tests] Fix condition to not build packaged macOS tests in parallel in CI. (#19838)
Funny how hard boolean logic is 😐

Ref: 7003d324ef
2024-01-19 14:35:29 -05:00
Rolf Bjarne Kvinge d9405ff27c
[tests] Misc changes to make tests work/pass when .NET isn't enabled. (#18828) 2023-08-28 16:15:28 +02:00
Rolf Bjarne Kvinge cdac4507a2
[devops] Stop building test dependencies on each test run. (#18096)
Stop building the test dependencies on each test run, and instead use the archived test dependencies we have from the main build:

* Stop running 'make all' in tests/ on every separate test run.
* Add a lot more stuff in the package-test-libraries.zip archive.
* Extract all the new stuff on every test run. We add stuff from outside the tests/
  directory, so adjust archive creation and extraction to use the root directory
  of the repository as the root of the zip archive as well.
* Also add the introspection dependencies to the same archive to simplify the logic.
* Fix xharness to not store absolute paths in generated projects.
* Fix test project to not automatically run make in tests/test-libraries when running
  on the bots.

Building the test dependencies takes ~10 minutes for each test run, so this saves
about that time for each test run.
2023-05-15 18:41:49 +02:00
Rolf Bjarne Kvinge 407b4c4ac6
[tests] Add logic to detect when macOS and Mac Catalyst test apps don't launch properly. Fixes #xamarin/maccore@2414. (#16946)
Implement a launch timeout for macOS and Mac Catalyst apps where if a certain
environment variable (LAUNCH_SENTINEL_FILE) is set, the app will create that
file at launch. The code launching the test app will wait 10 seconds and check
if the file is there: if it's not, something went wrong, in which case the app
should be terminated and launched again.

This necessitated re-implementing the launch script in C#, since it got quite
complicated to implement in bash.

This fixes an issue with Mac Catalyst apps where something would go wrong
during the app launch and nothing would happen (but the app wouldn't be
deadlocked, it would just sit there, doing nothing).

The TestRuntime.cs and ApplePlatform.cs had to be added to a few test projects
to make this compile, which required a few fixes in these files for building
with legacy Xamarin.Mac.

Fixes https://github.com/xamarin/maccore/issues/2414.
2022-12-06 13:11:36 +01:00
Rolf Bjarne Kvinge 7003d324ef
[tests] Don't build packaged macOS tests in parallel in CI. (#16785)
The random build failure it causes aren't worth it for the speed gain.
2022-11-17 13:00:43 +01:00
Rolf Bjarne Kvinge d0fa5760e1
[tests] Fix typo in 'test' call in script to package mac tests. (#16496) 2022-10-28 09:53:28 +02:00
Rolf Bjarne Kvinge 25e951691d
[tests] Only package macOS tests for enabled platforms. (#16434)
For instance don't build for Mac Catalyst if Mac Catalyst isn't enabled.
2022-10-25 07:54:58 +02:00
Rolf Bjarne Kvinge 421dad0fed
[tests] Don't package/execute legacy mac tests if legacy hasn't been enabled. (#16051) 2022-09-22 07:13:24 +02:00
Rolf Bjarne Kvinge 9c185e1fff
[msbuild] Ask ditto to thin native libraries according to the architectures we're targetting. Fixes #13081. (#14403)
Ask ditto to thin native libraries and frameworks when copying them to the app
bundle to remove slices for architectures we're not building for.

Also add tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/13081.

Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2022-04-07 08:17:01 +02:00
Rolf Bjarne Kvinge 42d561c623
[tests] Execute tests on older macOS bots with a timeout. (#14593)
This prevents a single test hang from breaking the entire test run.

Also bump timeout to 45 minutes.
2022-04-04 19:16:48 +02:00
Rolf Bjarne Kvinge 63de01c21c
[tests] Fix packaging of Xamarin.Mac tests. (#12776)
I recently deleted the generated makefile support for building and running our
test suites. It turned out that it was used for building the packaged
Xamarin.Mac tests, so it wasn't as unused as I thought.

So fix the building and packaging of Xamarin.Mac tests to not use the
(non-existent) makefile targets, but instead replicate it with manual make
code.

Also take the opportunity to add packaging and execution of the .NET versions
of these test suites we execute on other macOS versions (both for macOS and
the Mac Catalyst).

* [devops] Use stricter matching when finding the Xamarin.Mac pkg link.

Otherwise the branch name in any package could end up matching the pattern we
were looking for:

	XM_PACKAGE=https://bosstoragemirror.blob.core.windows.net/wrench/tests-package-xamarin-mac-tests/15759261d425ae08494b0a26862a0b1356c5f8ec/5268864/package/Microsoft.iOS.Bundle.15.0.101-ci.tests-package-xamarin-mac-tests.68.pkg

is just clearly wrong.
2021-10-06 08:10:07 +02:00
Manuel de la Pena d04a86a408
[CI][VSTS] The pkg of the tests fail because there is a path not longer found. (#10432) 2021-01-15 07:53:05 -05:00
Rolf Bjarne Kvinge 93bbfe7a86
[tests] Merge apitest into xammac_tests. (#10276)
* [apitest] Sanitize files by adding missing eols.

* [apitest] Add #if __MACOS__ to all test files.

In preparation for the move into monotouchtest.

* [apitest] Move test files into monotouchtest.

* [tests] Remove the apitest project.

* [monotouch-test] Remove MessagingMac.cs, it's not needed.

* [xammac-tests] Add file PlatformInfo.cs to the build.

* [xammac-tests] Move files into monotouch-test.

* [monotouch-test] Rename test class to not clash with another test class of the same (Objective-C) name.

* [tests] How did this ever work?

Answer: it never did.

* [monotouch-test] Remove duplicated test code.

* [xammac-tests] Define DYNAMIC_REGISTRAR when we're using the dynamic registrar.

* [monotouch-test] Adjust the BundleTest.TestGetBundleId test to cope with having multiple apps for the same bundle id.

* [monotouch-test] Ignore a test that doesn't work with the static registrar (due to a bug in the static registrar).
2020-12-18 11:45:06 +01:00
Rolf Bjarne Kvinge d9822057ab
[tests] Prebuilt the Touch.Client projects when packaging the Xamarin.Mac tests. (#9595)
Prebuild the Touch.Client projects for macOS when packaging the Xamarin.Mac
tests, so that when we try to build all the Xamarin.Mac test projects in
parallel, we don't end up trying to build the Touch.Client projects from
multiple build processes at the same time, causing numerous random failures
because all the processes are stomping on eachother.
2020-09-08 14:45:58 +02:00
Rolf Bjarne Kvinge cad850fae7 [tests] Restore projects before building them from the command line. 2020-08-03 11:53:18 +02:00
Rolf Bjarne Kvinge a3a9cf1558 [tests] Update the list of .apps to package. 2020-07-28 08:42:07 +02:00
Rolf Bjarne Kvinge cff47214ec [tests] Move bindings-test[-mac].csproj to their own directory. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge 7b1592bd4e
[tests] Remove common.mk, it doesn't look like this file is used anymore. (#9115) 2020-07-17 15:26:48 +02:00
Rolf Bjarne Kvinge 22b8c8c169
[tests] Package Xamarin.Mac tests using 7z instead of zip. (#6583)
This makes the package 33% smaller (from 176mb to 117mb).
2019-07-22 00:30:14 -07:00
Jo Shields a29ae8e6df 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 ce5ba1e41d (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 3e7bc29ade 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 17:24:00 +02:00
Rolf Bjarne Kvinge 37cd57219c
[tests] Use xibuild when building packaged XM tests. Fixes maccore#1169. (#5164)
Fixes https://github.com/xamarin/maccore/issues/1169.
2018-11-21 09:59:10 -05:00
Rolf Bjarne Kvinge 3835e1dafb
[tests] Point MSBuild to the right Xamarin.Mac location when building packaged Xamarin.Mac tests. Fixes maccore#1115. (#5090)
* [tests] Point MSBuild to the right Xamarin.Mac location when building packaged Xamarin.Mac tests. Fixes maccore#1115.

Fixes https://github.com/xamarin/maccore/issues/1115.

* [xharness] Ensure all makefile targets set the proper environment variables.
2018-11-07 09:34:16 +01:00
Rolf Bjarne Kvinge c69c74b3d3
Clone files if possible whenever it makes sense. (#5049)
Cloning is faster when supported, and it also saves disk space.
2018-10-29 16:09:30 +01:00
Rolf Bjarne Kvinge 2b85aaef56
[tests] Only build exactly what's neded for running XM tests on older bots. (#5038)
Also build what we can in parallel (and manually building shared dependencies first).
2018-10-25 17:17:03 +02:00
Rolf Bjarne Kvinge 904be25c25
[xharness] Generate a system variant of dont link, and run it using the oldest mono version we support in Jenkins. Fixes #4121. (#4968)
This is an addition to the tests we already run on older macOS bots (and as such will not execute on our PR bots).

Fixes https://github.com/xamarin/xamarin-macios/issues/4121.
2018-10-15 16:51:46 +02:00
Rolf Bjarne Kvinge 28b1978387
Bundle Make.version with the packaged XM tests to fix testing. (#4938) 2018-10-08 07:09:09 +02:00
Rolf Bjarne Kvinge badfc700bb [jenkins] Run more tests on additional macOS versions (introspection, linksdk, linkall and xammac_tests).
Also add Mojave (10.14) to the additional macOS versions.
2018-07-03 16:53:29 +02:00
Rolf Bjarne Kvinge 6b5870d668
[tests] Move linker tests to match introspection directory layout. (#3365)
* [tests] Move linker tests to match introspection directory layout.

Move linker tests to match introspectio directory layout: tests/linker/ios and
tests/linker/mac instead of tests/linker-ios and tests/linker-mac.

This creates a logical place for shared linker files (tests/linker).

* [tests] Fix path to GuiUnit_NET_4_5.csproj in sln as well.

This is the path used to find referenced projects when building Classic.

Fixes this build problem:

    warning: Referenced project 'GuiUnit_NET_4_5' not found in the solution.
    /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs(11,7) : error CS0246: The type or namespace name `GuiUnit' could not be found. Are you missing an assembly reference?
    /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs(64,42) : error CS0246: The type or namespace name `IMainLoopIntegration' could not be found. Are you missing an assembly reference?
    /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs(75,34) : error CS0246: The type or namespace name `InvokerHelper' could not be found. Are you missing an assembly reference?
2018-02-05 15:09:04 +01:00
Rolf Bjarne Kvinge 77aac2ceef
[tests] Package linker tests too for the packaged XM tests. (#3287)
Make sure to package the linker tests when packaging XM tests (this broke
recently because the dontlink tests were moved).

Fixes this problem when running the packaged tests:

    make[2]: linker-mac/dont link/bin/x86/Debug/dont link.app/Contents/MacOS/dont link: No such file or directory
    make[2]: *** [exec-mac-classic-dont link] Error 1
    make[2]: linker-mac/dont link/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link: No such file or directory
    make[2]: *** [exec-mac-unified-dont link] Error 1
    make[2]: linker-mac/dont link/bin/x86/Debug-unifiedXM45/dont link.app/Contents/MacOS/dont link: No such file or directory
    make[2]: *** [exec-mac-unifiedXM45-dont link] Error 1
    make[2]: linker-mac/dont link/bin/x86/Debug-unified-32/dont link.app/Contents/MacOS/dont link: No such file or directory
    make[2]: *** [exec-mac-unified32-dont link] Error 1
    make[2]: linker-mac/dont link/bin/x86/Debug-unifiedXM45-32/dont link.app/Contents/MacOS/dont link: No such file or directory
    make[2]: *** [exec-mac-unifiedXM4532-dont link] Error 1
    exec-mac-classic-dont\ link failed
    exec-mac-unified-dont\ link failed
    exec-mac-unifiedXM45-dont\ link failed
    exec-mac-unified32-dont\ link failed
    exec-mac-unifiedXM4532-dont\ link failed
    make[1]: *** [exec-mac-dontlink] Error 1
2018-01-23 23:47:53 +01:00
Rolf Bjarne Kvinge de980207c8 [tests] Add scripts to install system dependencies to the XM tests package. (#847)
* [system-dependencies] Add arguments to disable certain checks.

* [tests] Add scripts to install system dependencies to the XM tests package.
2016-09-19 10:02:10 -04:00
Chris Hamons 0756febb1c [XM] Revert mac test packages script changes, as we are not running mmp/msbuild tests on test bots (#374)
This reverts commit e780e28f5c and 35b26be50c
2016-07-12 22:56:17 +02:00
Chris Hamons 35b26be50c [XM] Package mac-binding-project since so many mmp and msbuild tests use the native libs it builds (#365) 2016-07-08 15:09:03 -05:00
Chris Hamons e780e28f5c Package up tests/common/mac to start fixing test issues (#341) 2016-07-05 10:11:54 -04:00
Rolf Bjarne Kvinge 0a19b5e3fc [tests] Fix mac tests package layout after tests move. (#141) 2016-06-07 13:35:12 -04:00
Rolf Bjarne Kvinge 4a714f3c43 Make logic not depend on the checkout directory being named 'xamarin-macios'. (#129) 2016-06-06 12:18:52 +02:00
Rolf Bjarne Kvinge ecfdea9508 [tests] Import 2016-05-26 15:06:52 +02:00