[testrunner] FuchsiaTester to conditionally overwrite "command".
Only overwrite "command" if it doesn't exist, otherwise use the supplied "command" as is.
Bug: IN-1310
Change-Id: I662ab5678d865b614f1e628e0bd14c77100b291c
diff --git a/cmd/testrunner/tester.go b/cmd/testrunner/tester.go
index 150ee96..ec8748a 100644
--- a/cmd/testrunner/tester.go
+++ b/cmd/testrunner/tester.go
@@ -134,8 +134,10 @@
}
func (t *FuchsiaTester) Test(ctx context.Context, test testsharder.Test, stdout io.Writer, stderr io.Writer) error {
- name := path.Base(test.Path)
- test.Command = []string{"runtests", "-t", name, "-o", t.remoteOutputDir + "runtests"}
+ if len(test.Command) == 0 {
+ name := path.Base(test.Path)
+ test.Command = []string{"runtests", "-t", name, "-o", t.remoteOutputDir + "runtests"}
+ }
return t.delegate.Test(ctx, test, stdout, stderr)
}