From ac28c1c5602f7ab2205b8fe5f181352d800ba26d Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 19 Apr 2022 10:38:34 +0200 Subject: [PATCH] [tests] Add some code to try to diagnose why certain test failures aren't ignored in CI. --- tests/common/TestRuntime.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/common/TestRuntime.cs b/tests/common/TestRuntime.cs index fc050d52d118..ce5d9133bc76 100644 --- a/tests/common/TestRuntime.cs +++ b/tests/common/TestRuntime.cs @@ -115,8 +115,11 @@ public static void IgnoreInCI (string message) { var in_ci = !string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("BUILD_REVISION")); in_ci |= !string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("BUILD_SOURCEVERSION")); // set by Azure DevOps - if (!in_ci) + if (!in_ci) { + Console.WriteLine ($"Not ignoring test ('{message}'), because not running in CI. BUILD_REVISION={Environment.GetEnvironmentVariable ("BUILD_REVISION")} BUILD_SOURCEVERSION={Environment.GetEnvironmentVariable ("BUILD_SOURCEVERSION")}"); return; + } + Console.WriteLine ($"Ignoring test ('{message}'), because not running in CI. BUILD_REVISION={Environment.GetEnvironmentVariable ("BUILD_REVISION")} BUILD_SOURCEVERSION={Environment.GetEnvironmentVariable ("BUILD_SOURCEVERSION")}"); NUnit.Framework.Assert.Ignore (message); }