testdata: remove some unnecessary execs (#267)

Our use of go-internal's gotooltest.Setup means that "go" is set up as a
top-level command in the scripts, so we can simply "go build" instead of
having to "exec go build". The result is practically the same, but the
scripts are simpler.

While at it, I had left an "exec cat" behind; remove it.
pull/268/head
Daniel Martí 5 years ago committed by GitHub
parent 4e9ee17ec8
commit b71ff42877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,7 +28,7 @@ stdout 'unknown'
[short] stop # checking that the build is reproducible is slow [short] stop # checking that the build is reproducible is slow
# Check that we fail if the user used "go build -toolexec garble" instead of "garble build" # Check that we fail if the user used "go build -toolexec garble" instead of "garble build"
! exec go build -a -toolexec=garble main.go ! go build -a -toolexec=garble main.go
stderr 'not running "garble \[command\]"' stderr 'not running "garble \[command\]"'
# Also check that the binary is reproducible. # Also check that the binary is reproducible.
@ -41,7 +41,7 @@ bincmp main$exe main_old$exe
# Check that the program works as expected without garble. No need to verify # Check that the program works as expected without garble. No need to verify
# this when we run with -short. # this when we run with -short.
exec go build main.go go build main.go
exec ./main exec ./main
cmp stderr main.stderr cmp stderr main.stderr

@ -15,7 +15,7 @@ exec ./main
cmp stderr main.stderr cmp stderr main.stderr
! binsubstr main$exe 'unexportedVersion' ! binsubstr main$exe 'unexportedVersion'
exec go build -ldflags=${LDFLAGS} go build -ldflags=${LDFLAGS}
exec ./main exec ./main
cmp stderr main.stderr cmp stderr main.stderr
binsubstr main$exe 'unexportedVersion' binsubstr main$exe 'unexportedVersion'

@ -7,7 +7,7 @@ cmp stderr main.stderr
[short] stop # no need to verify this with -short [short] stop # no need to verify this with -short
exec go build go build
exec ./main exec ./main
cmp stderr main.stderr-orig cmp stderr main.stderr-orig
binsubstr main$exe '(devel)' binsubstr main$exe '(devel)'

@ -8,7 +8,6 @@ env GOPRIVATE=test/main
garble build garble build
exec ./main exec ./main
cp stderr main.stderr cp stderr main.stderr
exec cat main.stderr
# Ensure that the garbled panic output looks correct. # Ensure that the garbled panic output looks correct.
# This output is not reproducible between 'go test' runs, # This output is not reproducible between 'go test' runs,

@ -16,7 +16,7 @@ stdout 'PASS.*TestSeparateFoo'
[short] stop # no need to verify this with -short [short] stop # no need to verify this with -short
# verify with regular cmd/go # verify with regular cmd/go
exec go test -v go test -v
stdout 'PASS.*TestFoo' stdout 'PASS.*TestFoo'
-- go.mod -- -- go.mod --

Loading…
Cancel
Save