You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
garble/testdata/scripts
Daniel Martí 2d12f41e71 actually remove temporary directories after obfuscation
Back in February 2021, we changed the obfuscation logic so that the
entire `garble build` process would use one shared temporary directory
across all package builds, reducing the amount of files we created in
the top-level system temporary directory.

However, we made one mistake: we didn't swap os.Remove for os.RemoveAll.
Ever since then, we've been leaving temporary files behind.

Add regression tests, which failed before the fix, and fix the bug.
Note that we need to test `garble reverse` as well, as it calls
toolexecCmd separately, so it needs its own cleanup as well.

The cleanup happens via the env var, which doesn't feel worse than
having toolexecCmd return an extra string or cleanup func.

While here, also test that we support TMPDIRs with special characters.
3 years ago
..
asm.txt all: drop support for Go 1.17 3 years ago
basic.txt add missing context to two unmarshal errors 3 years ago
cgo.txt fix TODOs about code which is now unused 3 years ago
crossbuild.txt all: drop support for Go 1.17 3 years ago
debugdir.txt all: drop support for Go 1.17 3 years ago
embed.txt all: drop support for Go 1.17 3 years ago
goenv.txt actually remove temporary directories after obfuscation 3 years ago
gogarble.txt all: drop support for Go 1.17 3 years ago
goversion.txt all: drop support for Go 1.17 3 years ago
help.txt fix support with the latest Go master version 3 years ago
implement.txt all: drop support for Go 1.17 3 years ago
imports.txt support import paths ending with ".go" 3 years ago
init.txt all: drop support for Go 1.17 3 years ago
ldflags.txt slight simplifications and alloc reductions 3 years ago
linkname.txt all: drop support for Go 1.17 3 years ago
literals.txt Disable seed obfuscator (#535) 3 years ago
modinfo.txt all: drop support for Go 1.17 3 years ago
plugin.txt all: drop support for Go 1.17 3 years ago
position.txt all: drop support for Go 1.17 3 years ago
reflect.txt fix support with the latest Go master version 3 years ago
reverse.txt actually remove temporary directories after obfuscation 3 years ago
seed-cache.txt all: drop support for Go 1.17 3 years ago
seed.txt all: drop support for Go 1.17 3 years ago
syntax.txt all: drop support for Go 1.17 3 years ago
test.txt skip unnecessary "refusing to list" test errors 3 years ago
tiny.txt all: drop support for Go 1.17 3 years ago
typeparams.txt fix hashing of generic field names 3 years ago