@@ -234,14 +234,28 @@ jobs:
234234
235235 # Test artifacts (x64 only)
236236 - ${{ if parameters.includeTestArtifacts }} :
237+ - powershell : |
238+ # Create a single-arch msixbundle for test installation.
239+ # Tests require a bundle (not standalone msix) for the WslInstaller service to trigger MSI auto-install.
240+ $version = "$(version.WSL_PACKAGE_VERSION)"
241+ $bundleDir = "$(ob_outputDirectory)\testbin\x64\release"
242+ New-Item -ItemType Directory -Path $bundleDir -Force
243+ $mappingsFile = Join-Path $bundleDir "test-bundle-mappings.ini"
244+ $msix = "bin\x64\release\installer.msix"
245+ $bundlePath = Join-Path $bundleDir "installer.msixbundle"
246+ Set-Content $mappingsFile "[Files]"
247+ Add-Content $mappingsFile "`"$((Resolve-Path $msix).Path)`" `"Microsoft.WSL_${version}_x64.msix`""
248+ & makeappx.exe bundle -f $mappingsFile -bv $version -o -p $bundlePath
249+ if ($LASTEXITCODE -ne 0) { throw "makeappx bundle failed with exit code $LASTEXITCODE" }
250+ Remove-Item $mappingsFile
251+ displayName: Create test msixbundle
252+
237253 - powershell : |
238254 $taefVersion = (Select-Xml -Path packages.config -XPath '/packages/package[@id=''Microsoft.Taef'']/@version').Node.Value
239255 New-Item -ItemType Directory -Path "$(ob_outputDirectory)\bundle" -Force
240- mkdir $(ob_outputDirectory)\testbin\x64\release
241256
242257 Move-Item -Path "bin\x64\release\wsltests.dll" -Destination "$(ob_outputDirectory)\testbin\x64\release\wsltests.dll"
243258 Move-Item -Path "bin\x64\release\testplugin.dll" -Destination "$(ob_outputDirectory)\testbin\x64\release\testplugin.dll"
244- Copy-Item -Path "bin\x64\release\installer.msix" -Destination "$(ob_outputDirectory)\testbin\x64\release\installer.msix"
245259 Move-Item -Path "packages\Microsoft.Taef.$taefVersion\build\Binaries\x64" -Destination "$(ob_outputDirectory)\testbin\x64\release\taef"
246260
247261 Move-Item -Path "bin\x64\cloudtest" -Destination "$(ob_outputDirectory)\testbin\x64\cloudtest"
0 commit comments