[tests] Ignore RuntimeTest.MainThreadDeallocationTest if all optimizations are enabled and not linking everything. Fixes #4566. (#4744)

This test contains code that requires the dynamic registrar unless the code is
optimized, and it's only optimized if the assembly is linked, which only
happens if linking all assemblies.

So disable the test if dynamic registrar is removed (which happens when all
optimizations are enabled) and the assembly isn't linked.

Fixes https://github.com/xamarin/xamarin-macios/issues/4566.
This commit is contained in:
Rolf Bjarne Kvinge 2018-09-05 12:47:52 +02:00 коммит произвёл GitHub
Родитель af4f0f9a70
Коммит e5ee9606f0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -59,6 +59,11 @@ namespace Xamarin.Tests
[Test]
public void MainThreadDeallocationTest ()
{
#if OPTIMIZEALL
if (!TestRuntime.IsLinkAll)
Assert.Ignore ("This test must be processed by the linker if all optimizations are turned on.");
#endif
ObjCBlockTester.CallAssertMainThreadBlockRelease ((callback) => {
callback (42);
});