Given a Roslyn PR number (or AzDo build ID),
finds the set of tests failing in CI for that PR/build,
and produces a .playlist file which can be used in Visual Studio to run just the failing tests.
dotnet tool install -g testutil # install the tool
dotnet tool update -g testutil # update the tool if already installed
testutil <Roslyn GitHub PR number or build ID> # generates a .playlist fileThere's the great runfo tool
where you can do something similar via a command like
runfo.exe search-tests -b <number> --playlist tests.playlist.
However, the runfo tool requires authentication via PAT
(it has more functionality so it makes sense),
whereas testutil doesn't require any authentication,
so it's easier to use.
$version='<the next version here (without v prefix)>'
dotnet pack -p:PackageVersion=$version
# authenticate to nuget.org (only needed once)
winget install microsoft.nuge
nuget setapikey '<api key here>' -source https://api.nuget.org/v3/index.json
dotnet nuget push src/TestUtil/bin/Release/testutil.$version.nupkg --source https://api.nuget.org/v3/index.json
git tag v$version && git push origin v$version