go: Fix tasks when running tests/benchs in packages (#17998)

Turns out that #17645 reintroduced another regression and didn't catch
all the regressions in #17108.

Releases Notes:

- Fixed Go tasks not working properly when running tests or benchmarks
in subfolders/packages.

Co-authored-by: Piotr <piotr@zed.dev>
This commit is contained in:
Thorsten Ball
2024-09-18 12:34:10 +02:00
committed by GitHub
co-authored by Piotr
parent 550ceec549
commit aae26ee33d
+1 -3
View File
@@ -519,7 +519,6 @@ impl ContextProvider for GoContextProvider {
command: "go".into(),
args: vec![
"test".into(),
GO_PACKAGE_TASK_VARIABLE.template_value(),
"-run".into(),
format!("^{}\\$", VariableName::Symbol.template_value(),),
],
@@ -530,7 +529,7 @@ impl ContextProvider for GoContextProvider {
TaskTemplate {
label: format!("go test {}", GO_PACKAGE_TASK_VARIABLE.template_value()),
command: "go".into(),
args: vec!["test".into(), GO_PACKAGE_TASK_VARIABLE.template_value()],
args: vec!["test".into()],
cwd: package_cwd.clone(),
..TaskTemplate::default()
},
@@ -572,7 +571,6 @@ impl ContextProvider for GoContextProvider {
command: "go".into(),
args: vec![
"test".into(),
GO_PACKAGE_TASK_VARIABLE.template_value(),
"-benchmem".into(),
"-run=^$".into(),
"-bench".into(),