[tests] Ignore BaseOptimizeGeneratedCodeTest.SetupBlockPerfTest when doing CI. Fixes xamarin/maccore#649. (#6183)

The BaseOptimizeGeneratedCodeTest.SetupBlockPerfTest test is randomly failing
fairly often now, which means it turns CI builds red.

So disable it, but since I don't like disabling tests I've only disabled it
when doing CI. Hopefully we'll find out if there are any regressions when
running tests locally.

Fixes https://github.com/xamarin/maccore/issues/649.
This commit is contained in:
Rolf Bjarne Kvinge 2019-06-03 07:54:30 -07:00 коммит произвёл GitHub
Родитель 4d8c0df299
Коммит 7d67e0585c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 11 добавлений и 0 удалений

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

@ -103,6 +103,14 @@ partial class TestRuntime
return new Version (major, minor, build);
}
public static void IgnoreInCI (string message)
{
var in_ci = !string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("BUILD_REVISION"));
if (!in_ci)
return;
NUnit.Framework.Assert.Ignore (message);
}
public static void AssertXcodeVersion (int major, int minor, int build = 0)
{
if (CheckXcodeVersion (major, minor, build))

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

@ -76,6 +76,9 @@ namespace Linker.Shared
{
IgnoreIfNotLinkAll ();
// If you ran this test locally and it failed, run it again. If it fails multiple times, file a bug.
TestRuntime.IgnoreInCI ("This test randomly fails, so ignore it when doing CI (https://github.com/xamarin/maccore/issues/649)");
const int iterations = 5000;
// Set the XAMARIN_IOS_SKIP_BLOCK_CHECK environment variable to skip a few expensive validation checks done in the simulator