]> Cypherpunks repositories - gostls13.git/commit
cmd/go: convert some testcases to the script framework
authorMichael Matloob <matloob@golang.org>
Thu, 26 Dec 2019 21:06:49 +0000 (16:06 -0500)
committerMichael Matloob <matloob@golang.org>
Mon, 6 Jan 2020 17:32:58 +0000 (17:32 +0000)
commitfab2e86ba230389b270940c4e1a8e30c2bbb59f2
tree744d642b567a959845c6e13aee96de8ae669f420
parent57b22c51162035a52fdf09f043b1fed63faa28bc
cmd/go: convert some testcases to the script framework

This change converts TestFatalInBenchmarkCauseNonZeroExitStatus,
TestBenchmarkLabels and TestWildCardsDoNotLookInUselessDirectories
to the script framework so they can run in parallel. These tests
used the testdata directory so they didn't call tg.parallel, because
they couldn't be sure the testdata directory wasn't being
modified while they were being run.

The tests are converted to the script framework instead of being modified
because the script framework tests are easier to read and are self-contained.

Also remove the directory src/cmd/go/testdata/src/badc. The testcase
that used it, "TestDisallowedCSourceFiles" was deleted in
golang.org/cl/19613.

Updates #17751

Change-Id: I0b9b417ae1a9b148067a3e5f8531229f3414f104
Reviewed-on: https://go-review.googlesource.com/c/go/+/212620
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/go_test.go
src/cmd/go/testdata/script/README
src/cmd/go/testdata/script/list_wildcard_skip_nonmatching.txt [new file with mode: 0644]
src/cmd/go/testdata/script/test_benchmark_fatal.txt [new file with mode: 0644]
src/cmd/go/testdata/script/test_benchmark_labels.txt [new file with mode: 0644]
src/cmd/go/testdata/src/badc/x.c [deleted file]
src/cmd/go/testdata/src/badc/x.go [deleted file]
src/cmd/go/testdata/src/badpkg/x.go [deleted file]
src/cmd/go/testdata/src/bench/x_test.go [deleted file]
src/cmd/go/testdata/src/benchfatal/x_test.go [deleted file]