Skip to content

Commit 9d43d6e

Browse files
authored
Look for shipping artifacts according to the build configuration (#8616)
1 parent a6af591 commit 9d43d6e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/Shared/TemplatesTesting/BuildEnvironment.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@ public BuildEnvironment(bool useSystemDotNet = false, string sdkDirName = "dotne
101101
sdkForTemplatePath = Path.GetDirectoryName(dotnetPath)!;
102102
}
103103

104-
BuiltNuGetsPath = Path.Combine(RepoRoot.FullName, "artifacts", "packages", EnvironmentVariables.BuildConfiguration, "Shipping");
104+
#if RELEASE
105+
BuiltNuGetsPath = Path.Combine(RepoRoot.FullName, "artifacts", "packages", "Release", "Shipping");
106+
#else
107+
BuiltNuGetsPath = Path.Combine(RepoRoot.FullName, "artifacts", "packages", "Debug", "Shipping");
108+
#endif
105109

106110
PlaywrightProvider.DetectAndSetInstalledPlaywrightDependenciesPath(RepoRoot);
107111
}

tests/Shared/TemplatesTesting/EnvironmentVariables.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ public static class EnvironmentVariables
1111
public static readonly string? BuiltNuGetsPath = Environment.GetEnvironmentVariable("BUILT_NUGETS_PATH");
1212
public static readonly bool ShowBuildOutput = Environment.GetEnvironmentVariable("SHOW_BUILD_OUTPUT") is "true";
1313
public static readonly bool IsRunningOnCI = Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") is not null;
14-
public static readonly bool TestsRunningOutsideOfRepo = Environment.GetEnvironmentVariable("TestsRunningOutsideOfRepo") is "true";
15-
public static readonly string BuildConfiguration = Environment.GetEnvironmentVariable("BUILD_CONFIGURATION") ?? "Debug";
14+
public static readonly bool TestsRunningOutsideOfRepo = Environment.GetEnvironmentVariable("TestsRunningOutsideOfRepo") is "true";
1615
public static readonly string? TestScenario = Environment.GetEnvironmentVariable("TEST_SCENARIO");
1716
public static readonly string? DefaultTFMForTesting = Environment.GetEnvironmentVariable("DEFAULT_TFM_FOR_TESTING");
1817
}

0 commit comments

Comments
 (0)