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:
parent
550ceec549
commit
aae26ee33d
1 changed files with 1 additions and 3 deletions
|
@ -519,7 +519,6 @@ impl ContextProvider for GoContextProvider {
|
||||||
command: "go".into(),
|
command: "go".into(),
|
||||||
args: vec![
|
args: vec![
|
||||||
"test".into(),
|
"test".into(),
|
||||||
GO_PACKAGE_TASK_VARIABLE.template_value(),
|
|
||||||
"-run".into(),
|
"-run".into(),
|
||||||
format!("^{}\\$", VariableName::Symbol.template_value(),),
|
format!("^{}\\$", VariableName::Symbol.template_value(),),
|
||||||
],
|
],
|
||||||
|
@ -530,7 +529,7 @@ impl ContextProvider for GoContextProvider {
|
||||||
TaskTemplate {
|
TaskTemplate {
|
||||||
label: format!("go test {}", GO_PACKAGE_TASK_VARIABLE.template_value()),
|
label: format!("go test {}", GO_PACKAGE_TASK_VARIABLE.template_value()),
|
||||||
command: "go".into(),
|
command: "go".into(),
|
||||||
args: vec!["test".into(), GO_PACKAGE_TASK_VARIABLE.template_value()],
|
args: vec!["test".into()],
|
||||||
cwd: package_cwd.clone(),
|
cwd: package_cwd.clone(),
|
||||||
..TaskTemplate::default()
|
..TaskTemplate::default()
|
||||||
},
|
},
|
||||||
|
@ -572,7 +571,6 @@ impl ContextProvider for GoContextProvider {
|
||||||
command: "go".into(),
|
command: "go".into(),
|
||||||
args: vec![
|
args: vec![
|
||||||
"test".into(),
|
"test".into(),
|
||||||
GO_PACKAGE_TASK_VARIABLE.template_value(),
|
|
||||||
"-benchmem".into(),
|
"-benchmem".into(),
|
||||||
"-run=^$".into(),
|
"-run=^$".into(),
|
||||||
"-bench".into(),
|
"-bench".into(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue