Skip to content

Commit d0c5be6

Browse files
committed
Update version test to use common sdk
1 parent 0a07ce3 commit d0c5be6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/SourceBuiltArtifactsTests.cs

+3-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace Microsoft.DotNet.SourceBuild.Tests;
1717
public class SourceBuiltArtifactsTests : SdkTests
1818
{
1919
public static bool IncludeSourceBuiltArtifactsTests => !string.IsNullOrWhiteSpace(Config.SourceBuiltArtifactsPath);
20-
20+
2121
public SourceBuiltArtifactsTests(ITestOutputHelper outputHelper) : base(outputHelper) { }
2222

2323
[ConditionalFact(typeof(SourceBuiltArtifactsTests), nameof(IncludeSourceBuiltArtifactsTests))]
@@ -55,9 +55,8 @@ public void VerifyVersionFile()
5555

5656
string sdkVersion = versionLines[1];
5757

58-
// Find the expected SDK version by getting it from the SDK tarball
59-
Utilities.ExtractTarball(Config.SdkTarballPath ?? string.Empty, outputDir, "./sdk/*/.version");
60-
DirectoryInfo sdkDir = new DirectoryInfo(Path.Combine(outputDir, "sdk"));
58+
// Find the expected SDK version by getting it from the source built SDK
59+
DirectoryInfo sdkDir = new DirectoryInfo(Path.Combine(Config.DotNetDirectory, "sdk"));
6160
string sdkVersionPath = sdkDir.GetFiles(".version", SearchOption.AllDirectories).Single().FullName;
6261
string[] sdkVersionLines = File.ReadAllLines(Path.Combine(outputDir, sdkVersionPath));
6362
string expectedSdkVersion = sdkVersionLines[3]; // Get the unique, non-stable, SDK version

0 commit comments

Comments
 (0)