From 6ff4234587a7509db17262c7a64db17daee12806 Mon Sep 17 00:00:00 2001 From: Zeling Feng Date: Wed, 2 Sep 2020 19:17:32 -0700 Subject: Add support to run packetimpact tests against Fuchsia blaze test _fuchsia_test will run the corresponding packetimpact test against fuchsia. PiperOrigin-RevId: 329835290 --- pkg/test/dockerutil/container.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'pkg/test/dockerutil/container.go') 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 { -- cgit v1.2.3