diff options
author | Zeling Feng <zeling@google.com> | 2020-09-02 19:17:32 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-09-02 19:19:40 -0700 |
commit | 86c1ae095a95d2433b874d9b052ebcea6fab0e26 (patch) | |
tree | 31deeb446dfc35fdcb3f300f5a372f9894eb6923 /pkg/test | |
parent | b69352245ab729cc01088c8258a3167f069bd684 (diff) |
Add support to run packetimpact tests against Fuchsia
blaze test <test_name>_fuchsia_test will run the corresponding packetimpact
test against fuchsia.
PiperOrigin-RevId: 329835290
Diffstat (limited to 'pkg/test')
-rw-r--r-- | pkg/test/dockerutil/container.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pkg/test/dockerutil/container.go b/pkg/test/dockerutil/container.go index 052b6b99d..64d17f661 100644 --- a/pkg/test/dockerutil/container.go +++ b/pkg/test/dockerutil/container.go @@ -22,6 +22,7 @@ import ( "net" "os" "path" + "path/filepath" "regexp" "strconv" "strings" @@ -403,10 +404,13 @@ func (c *Container) CopyFiles(opts *RunOpts, target string, sources ...string) { return } for _, name := range sources { - src, err := testutil.FindFile(name) - if err != nil { - c.copyErr = fmt.Errorf("testutil.FindFile(%q) failed: %v", name, err) - return + src := name + if !filepath.IsAbs(src) { + src, err = testutil.FindFile(name) + if err != nil { + c.copyErr = fmt.Errorf("testutil.FindFile(%q) failed: %w", name, err) + return + } } dst := path.Join(dir, path.Base(name)) if err := testutil.Copy(src, dst); err != nil { |