@samitouri / QOSAMI-WSL / commits / 9e09fe79

Update setup-vm-for-tests.ps1 to copy the test distribution from the nuget package (#13149)

Blue committed Jun 20, 2025 at 14:16 UTC 9e09fe791c1b3deed8e0525e7acf3804af12d7c2
1 file changed +2 -9
tools/test/setup-vm-for-tests.ps1
+2 -9
@@ -27,8 +27,6 @@
27 Absolute Path to a folder on the the VM to copy taef binaries. Defaults to "C:\Taef".
28 .PARAMETER SkipDistro
29 Skip copying over the distro.
30 -.PARAMETER TestDistroName
31 - Name of test distro filename to be appended to the path. Auto filled if left empty.
30 .PARAMETER TestDistroPath
31 Path to the distro image to import and use for testing, if needed. Auto filled if left empty.
32 #>
@@ -48,7 +46,6 @@ param (
46 [string]$RemoteFolder = "C:\Package",
47 [string]$TaefFolder = "C:\Taef",
48 [switch]$SkipDistro,
51 - [string]$TestDistroName,
49 [string]$TestDistroPath
50 )
51
@@ -96,13 +93,9 @@ $Platform = switch ($Arch) {
93 default { throw "Architecture $Arch unknown" }
94 }
95
99 -if ([string]::IsNullOrEmpty($TestDistroName)) {
100 - # Be kind, rewind, update for amd64 and arm64!
101 - $TestDistroName = "debian_1.12.8.0.tar.xz"
102 -}
103 -
96 if ([string]::IsNullOrEmpty($TestDistroPath)) {
105 - $TestDistroPath = "\\sesdfs.corp.microsoft.com\1windows\TestContent\CORE\Base\HYP\LOW\lxss\$Arch\distros\$TestDistroName"
97 + $TestDistroVersion = (Select-Xml -Path "$PSScriptRoot\..\..\packages.config" -XPath '/packages/package[@id=''Microsoft.WSL.TestDistro'']/@version').Node.Value
98 + $TestDistroPath = "$PSScriptRoot\..\..\packages\Microsoft.WSL.TestDistro.$TestDistroVersion\test_distro.tar.xz"
99 }
100
101 if ([string]::IsNullOrEmpty($ArtifactFolder)) {