-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[wasm] Dispose Xunit ToolCommand #108319
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
[wasm] Dispose Xunit ToolCommand #108319
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,22 +108,20 @@ private void NonWasmConsoleBuild(string config, | |
| File.WriteAllText(Path.Combine(_projectDir, "Directory.Build.props"), "<Project />"); | ||
| File.WriteAllText(Path.Combine(_projectDir, "Directory.Build.targets"), directoryBuildTargets); | ||
|
|
||
| new DotNetCommand(s_buildEnv, _testOutput, useDefaultArgs: false) | ||
| .WithWorkingDirectory(_projectDir!) | ||
| .ExecuteWithCapturedOutput("new console --no-restore") | ||
| .EnsureSuccessful(); | ||
| using DotNetCommand cmd = new DotNetCommand(s_buildEnv, _testOutput, useDefaultArgs: false); | ||
| cmd.WithWorkingDirectory(_projectDir!) | ||
| .ExecuteWithCapturedOutput("new console --no-restore") | ||
| .EnsureSuccessful(); | ||
|
|
||
| new DotNetCommand(s_buildEnv, _testOutput, useDefaultArgs: false) | ||
| .WithWorkingDirectory(_projectDir!) | ||
| .ExecuteWithCapturedOutput($"build -restore -c {config} -bl:{Path.Combine(s_buildEnv.LogRootPath, $"{id}.binlog")} {extraBuildArgs} -f {targetFramework}") | ||
| .EnsureSuccessful(); | ||
| cmd.WithWorkingDirectory(_projectDir!) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Overriding working dir is void if we reuse the instance (which is by the way interesting idea!). Does it have any side effects? The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True, thanks for pointing out. Follow up PR it is. One side effect: runs will share the |
||
| .ExecuteWithCapturedOutput($"build -restore -c {config} -bl:{Path.Combine(s_buildEnv.LogRootPath, $"{id}.binlog")} {extraBuildArgs} -f {targetFramework}") | ||
| .EnsureSuccessful(); | ||
|
|
||
| if (shouldRun) | ||
| { | ||
| var result = new DotNetCommand(s_buildEnv, _testOutput, useDefaultArgs: false) | ||
| .WithWorkingDirectory(_projectDir!) | ||
| .ExecuteWithCapturedOutput($"run -c {config} -f {targetFramework} --no-build") | ||
| .EnsureSuccessful(); | ||
| CommandResult result = cmd.WithWorkingDirectory(_projectDir!) | ||
| .ExecuteWithCapturedOutput($"run -c {config} -f {targetFramework} --no-build") | ||
| .EnsureSuccessful(); | ||
|
|
||
| Assert.Contains("Hello, World!", result.Output); | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.