Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onboard to new dotnet test experience #5111

Merged
merged 55 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
5b99712
Onboard to new dotnet test experience
Evangelink Feb 24, 2025
af2e1f9
Update name
Youssef1313 Mar 6, 2025
39c6c27
Revert back
Youssef1313 Mar 6, 2025
8db05c8
Use the old experience for test assets
Youssef1313 Mar 6, 2025
fe77fea
Add missing paren
Youssef1313 Mar 6, 2025
f14c3b2
Use TestSuiteDirectory for dotnet.config and make it default working …
Youssef1313 Mar 6, 2025
9e2efb3
Update dotnet.config
Youssef1313 Mar 8, 2025
c94ee87
Revert back again...
Youssef1313 Mar 8, 2025
91bfcd9
Adjust for working directory of testhost
Youssef1313 Mar 8, 2025
ca186fd
Avoid racing
Youssef1313 Mar 8, 2025
0bbe49d
Create directory
Youssef1313 Mar 8, 2025
48bea7f
Revert
Youssef1313 Mar 8, 2025
adb848a
Adjust tests
Youssef1313 Mar 8, 2025
95f1ae5
Fix test
Youssef1313 Mar 8, 2025
a2fdd3c
Fix some tests
Youssef1313 Mar 8, 2025
bd1c429
Adjust
Youssef1313 Mar 8, 2025
82ca6d8
Adjust
Youssef1313 Mar 8, 2025
3b9a212
Fix tests
Youssef1313 Mar 9, 2025
dbb9a9e
One more fix
Youssef1313 Mar 9, 2025
a661056
Merge branch 'main' into dotnet-test-new-exp
Youssef1313 Mar 9, 2025
68f64cb
More progress
Youssef1313 Mar 9, 2025
569c16d
Fix more tests
Youssef1313 Mar 9, 2025
ebc54ff
More test fixes
Youssef1313 Mar 9, 2025
2b9e3a3
Use dotnet test in CI
Youssef1313 Mar 9, 2025
a6b7c83
Fix
Youssef1313 Mar 9, 2025
1c5748c
Fix for Playground not considered MTP
Youssef1313 Mar 9, 2025
d018400
Fix
Youssef1313 Mar 9, 2025
c24ee02
Fix for MSBuild unit tests
Youssef1313 Mar 9, 2025
85e9494
Update dotnet.config
Youssef1313 Mar 10, 2025
7c71858
Update SDK
Youssef1313 Mar 10, 2025
aba6450
Trace
Youssef1313 Mar 10, 2025
495afb3
Fix
Youssef1313 Mar 10, 2025
91ef8d0
Create directory
Youssef1313 Mar 10, 2025
abf88e9
Update SDK
Youssef1313 Mar 11, 2025
d70e862
Update SDK again
Youssef1313 Mar 12, 2025
7e32f80
Merge branch 'main' into dotnet-test-new-exp
Youssef1313 Mar 17, 2025
2cf00d1
Update
Youssef1313 Mar 17, 2025
4027275
Adjust arguments
Youssef1313 Mar 17, 2025
970a300
Import targets
Youssef1313 Mar 17, 2025
9eb4488
Build all tests
Youssef1313 Mar 17, 2025
d97b409
Adjust for non-Windows
Youssef1313 Mar 17, 2025
68cd58f
Fix
Youssef1313 Mar 17, 2025
7f5df52
Specify DOTNET_ROOT
Youssef1313 Mar 17, 2025
3d0ccc9
Use env variable
Youssef1313 Mar 17, 2025
2801519
Is Windows green now?
Youssef1313 Mar 18, 2025
ac2f2ec
Use slnf
Youssef1313 Mar 18, 2025
30eb698
Fix
Youssef1313 Mar 18, 2025
969f681
Fix
Youssef1313 Mar 18, 2025
0da773e
Fix typo
Youssef1313 Mar 18, 2025
4e75abe
.NET Framework only on Windows
Youssef1313 Mar 18, 2025
07daa78
Fix
Youssef1313 Mar 18, 2025
0a4fbdd
Merge branch 'main' into dotnet-test-new-exp
Youssef1313 Mar 19, 2025
c3ae9a3
Ignore flaky
Youssef1313 Mar 19, 2025
dacca6a
Fix
Youssef1313 Mar 20, 2025
ce6ae48
Is it going to be green now?
Youssef1313 Mar 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dotnet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[dotnet.test:runner]
name= "MicrosoftTestingPlatform"
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public static IProcessHandle Start(ProcessConfiguration config, bool cleanDefaul
{
string fullPath = config.FileName; // Path.GetFullPath(startInfo.FileName);
string workingDirectory = config.WorkingDirectory
.OrDefault(Path.GetDirectoryName(config.FileName).OrDefault(Directory.GetCurrentDirectory()));
.OrDefault(TempDirectory.TestSuiteDirectory);

ProcessStartInfo processStartInfo = new()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@ internal static (string BaseDirectory, string FinalDirectory) CreateUniqueDirect
string directoryPath = System.IO.Path.Combine(TestSuiteDirectory, RandomId.Next());
Directory.CreateDirectory(directoryPath);

// Our tests were originally wrote before the enhanced dotnet test support for MTP.
// So, by default we use VSTest.
// We can start to gradually move some of the MTP tests to the new dotnet test experience.
// Note that we have tests that are actually VSTest-specific.
string dotnetConfig = System.IO.Path.Combine(TestSuiteDirectory, "dotnet.config");
File.WriteAllText(dotnetConfig, """
[dotnet.test:runner]
name= "VSTest"
""");

string directoryBuildProps = System.IO.Path.Combine(directoryPath, "Directory.Build.props");
File.WriteAllText(directoryBuildProps, $"""
<?xml version="1.0" encoding="utf-8"?>
Expand Down
Loading