testdata: reduce the cost of short tests

Reduces "go test -short" with a warm build cache from ~9s to ~4s. The
main offender was the use of "-a" in the "garble test" call; I think I
added that flag to rebuild all packages when debugging an error, and
forgot to remove it.
pull/295/head
Daniel Martí 3 years ago committed by lu4p
parent 5572675988
commit 7294469a7f

@ -28,7 +28,7 @@ stdout 'unknown'
[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"
! go build -a -toolexec=garble main.go
! go build -toolexec=garble main.go
stderr 'not running "garble \[command\]"'
# Also check that the binary is reproducible.

@ -18,6 +18,8 @@ stdin main.stderr
garble reverse
cmp stdout reverse.stdout
[short] stop # no need to verify this with -short
# Ensure that the reversed output matches the non-garbled output.
go build -trimpath
exec ./main

@ -1,5 +1,5 @@
# build the test binary
garble test -c -a
garble test -c
! stdout 'PASS'
binsubstr bar.test$exe 'TestFoo' 'TestSeparateFoo'
! binsubstr bar.test$exe 'LocalFoo|ImportedVar|OriginalFuncName'

Loading…
Cancel
Save