Run the mocked Windows bootstrap installer harness:
pwsh -NoLogo -NoProfile -NonInteractive -File .\tests\Invoke-BootstrapInstallerTest.ps1Run the cross-platform scoped install smoke harness:
pwsh -NoLogo -NoProfile -NonInteractive -File .\tests\Invoke-ScopedInstallSmokeTest.ps1Use the local Pester harness to validate venv-sensitive cmdlet behavior across installed version aliases (pwsh-x.y.z).
Run all installed version aliases:
pwsh -NoLogo -NoProfile -NonInteractive -File .\tests\Invoke-VenvTestMatrix.ps1Run one alias only:
pwsh -NoLogo -NoProfile -NonInteractive -File .\tests\Invoke-VenvTestMatrix.ps1 -Aliases pwsh-7.4.13Include online install tests (Install-PSResource / Install-Module):
pwsh -NoLogo -NoProfile -NonInteractive -File .\tests\Invoke-VenvTestMatrix.ps1 -EnableOnlineTestsOnline mode details:
- The tests do not modify PSGallery trust policy.
Install-PSResourceuses-TrustRepository -Quiet.Install-Moduleuses-Force -AcceptLicense -Confirm:$false.- The install checks use
Yayamlto keep downloads and execution lightweight.
Useful flags:
-KeepVenvkeeps the temporary venvs for troubleshooting.-ContinueOnFailurekeeps running after a failed alias.
Pester must be available in the host PowerShell session.
Build the native NuGet package first, then run the AppHost smoke harness:
pwsh -NoLogo -NoProfile -File .\scripts\Build-NativeNuGetPackages.ps1 -RuntimeIdentifiers win-x64 -Clean
pwsh -NoLogo -NoProfile -NonInteractive -File .\tests\Invoke-AppHostNuGetPackageSmokeTest.ps1 -RuntimeIdentifier win-x64The smoke harness creates a temporary SDK-style sample project, restores Devolutions.MultiPwsh.Cli from the local package source, validates AppHost build/publish output copying, and runs a renamed local apphost beside pwsh.dll and pwsh.runtimeconfig.json when a PowerShell payload is available.
Pack the SDK and run the self-contained Win-x64 NativeAOT package harness
against a real PowerShell 7.4 payload root (the directory holding pwsh.dll
and pwsh.runtimeconfig.json):
dotnet pack dotnet\sdk-ffi\Devolutions.MultiPwsh.Sdk.csproj -c Release -o artifacts\sdk-nuget
pwsh -NoLogo -NoProfile -File .\tests\Test-PwshFfiPackage.ps1 `
-PackageSource artifacts\sdk-nuget `
-PowerShellPayloadDirectory <payload-root>The harness restores the inspected local .nupkg into an isolated NuGet cache,
verifies the restored package against its SHA-512, publishes a NativeAOT
consumer, and exercises the SDK surface end to end. It prints the qualified
PowerShell version and cross-checks it against the PowerShellFileVersion
reported by PowerShellRuntime.Diagnostics.
The harness normally requires the package version to match the crate version.
For an explicitly named local preview built with a package-version override,
pass -AllowPreviewVersionMismatch; this opt-in retains all package hash and
NativeAOT checks while making the version mismatch visible as a warning.
Verify the public/binding API baseline after changing any exported surface:
pwsh -NoLogo -NoProfile -File .\tests\Verify-PwshFfiApiBaseline.ps1The verifier exits non-zero on any drift; update tests\PwshFfiApiBaseline.txt
deliberately in the same change that alters the surface.
Contract-pack rejection fixtures run through the NativeAOT sample. Each must
exit 0 by being rejected — see
in-process FFI
for the fixture list and the rejection each one proves.