diff options
author | Josh Bleecher Snyder <josharian@gmail.com> | 2019-05-13 13:15:10 -0700 |
---|---|---|
committer | Josh Bleecher Snyder <josharian@gmail.com> | 2019-05-13 20:36:11 +0000 |
commit | f68244e6660d86b3d0be9258a5d35c109abc749f (patch) | |
tree | 2a5f3bc50c404d4f06d33bcf4008df7eb76fcac8 /src/cmd/objdump | |
parent | 337868305401dbe82a6a7235bb613392e86d8b40 (diff) | |
download | go-f68244e6660d86b3d0be9258a5d35c109abc749f.tar.gz go-f68244e6660d86b3d0be9258a5d35c109abc749f.zip |
cmd/objdump: ensure that test executable files are distinct
This fixes test failures introduced by CL 176901.
Change-Id: I133299ba3be3a15ced076c95e4833ba6070d7eb7
Reviewed-on: https://go-review.googlesource.com/c/go/+/176903
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd/objdump')
-rw-r--r-- | src/cmd/objdump/objdump_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/objdump/objdump_test.go b/src/cmd/objdump/objdump_test.go index 8d73c016c6..b24371ddea 100644 --- a/src/cmd/objdump/objdump_test.go +++ b/src/cmd/objdump/objdump_test.go @@ -5,6 +5,7 @@ package main import ( + "crypto/md5" "flag" "fmt" "go/build" @@ -101,7 +102,8 @@ func testDisasm(t *testing.T, printCode bool, flags ...string) { goarch = f[1] } - hello := filepath.Join(tmp, "hello.exe") + hash := md5.Sum([]byte(fmt.Sprintf("%v-%v", flags, printCode))) + hello := filepath.Join(tmp, fmt.Sprintf("hello-%x.exe", hash)) args := []string{"build", "-o", hello} args = append(args, flags...) args = append(args, "testdata/fmthello.go") |