-
Notifications
You must be signed in to change notification settings - Fork 290
Open
Open
Copy link
Labels
Area: MTPBelongs to the Microsoft.Testing.Platform core libraryBelongs to the Microsoft.Testing.Platform core library
Milestone
Description
Describe the bug
After upgrading from the .NET SDK 10.0.100 to 10.0.101, running tests started to completely fail.
Steps To Reproduce
-
Make sure that both the .NET SDK version 10.0.100 and 10.0.101 are installed to be able to fully reproduce.
-
Clone the https://github.com/0xced/nugraph repository with submodules
git clone --recurse-submodules https://github.com/0xced/nugraph
- Ensure that the commit is 26c592425f5b0310e6359e091681d2e121e9e9d0
cd nugraph
git checkout 26c592425f5b0310e6359e091681d2e121e9e9d0
- Ensure that the SDK version 10.0.100 is used
dotnet --version
10.0.100
- Configure for Release through the
Configurationenvironment variable
export Configuration=Release
- Run the tests
dotnet test
The output should look like this:
Running tests from tests/nugraph.Tests/bin/Release/net8.0/nugraph.Tests.dll (net8.0|arm64)
tests/nugraph.Tests/bin/Release/net8.0/nugraph.Tests.dll (net8.0|arm64) passed (10s 500ms)
Test run summary: Passed!
total: 30
failed: 0
succeeded: 30
skipped: 0
duration: 5s 561ms
- Edit the
global.jsonfile and update the .NET SDK version to 10.0.101. It should now be this:
{
"$schema": "https://www.schemastore.org/global.json",
"sdk": {
"version": "10.0.101"
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}- Run the tests again
git clean -fdx
dotnet test
Expected behavior
The tests pass, just like with the SDK version 10.0.100
Actual behavior
The tests completely fail.
The following exception occurred when running the test module with RunCommand '/home/runner/work/nugraph/nugraph/tests/nugraph.Tests/bin/Debug/net8.0/nugraph.Tests' and RunArguments ' --report-trx --report-trx-filename TestResults-net8.0.trx --results-directory /home/runner/work/nugraph/nugraph':
System.ComponentModel.Win32Exception (2): An error occurred trying to start process '/home/runner/work/nugraph/nugraph/tests/nugraph.Tests/bin/Debug/net8.0/nugraph.Tests' with working directory '/home/runner/work/nugraph/nugraph'. No such file or directory
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Microsoft.DotNet.Cli.Commands.Test.TestApplication.RunAsync()
at Microsoft.DotNet.Cli.Commands.Test.TestApplication.RunAsync()
at Microsoft.DotNet.Cli.Commands.Test.TestApplicationActionQueue.Read(BuildOptions buildOptions, TestOptions testOptions, TerminalTestReporter output, Action`1 onHelpRequested)
Test run summary: Zero tests ran
total: 0
failed: 0
succeeded: 0
skipped: 0
duration: 14ms
Test run completed with non-success exit code: 1 (see: https://aka.ms/testingplatform/exitcodes)
Additional context
GitHub actions:
✅ With SDK 10.0.100: https://github.com/0xced/nugraph/actions/runs/20195006748
❌ With SDK 10.0.101: https://github.com/0xced/nugraph/actions/runs/20194237078
Metadata
Metadata
Assignees
Labels
Area: MTPBelongs to the Microsoft.Testing.Platform core libraryBelongs to the Microsoft.Testing.Platform core library