Skip to content

Commit 8ec7d61

Browse files
committed
Try this
1 parent feacf52 commit 8ec7d61

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/CodeBehindTests.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,14 @@ string[] GetBuildProperties (LocalBuilder builder, AndroidRuntime runtime, bool
528528

529529
if (runtime == AndroidRuntime.NativeAOT) {
530530
// We disable these only on CI, since they would cause the tests to fail there.
531-
string? runningOnCI = Environment.GetEnvironmentVariable ("RunningOnCI");
531+
// It appears that despite us exporting `RunningOnCI` in our pipeline YAML, we actually get
532+
// an all-uppercase version of the variable:
533+
//
534+
// temp/CodeBehind/SuccessfulBuildFewNativeAOT/Release/Directory.Build.props(78,28): message : Property 'RUNNINGONCI' with value 'true' expanded from the environment.
535+
//
536+
string? runningOnCI =
537+
Environment.GetEnvironmentVariable ("RunningOnCI") ??
538+
Environment.GetEnvironmentVariable ("RUNNINGONCI");
532539
if (runningOnCI == "true") {
533540
Console.WriteLine ("CodeBehindTests: using NativeAOT and running on CI, disabling warnings.");
534541
noWarn.Add ("IL2091");

0 commit comments

Comments
 (0)