From ccb0e9ab885512d38196ba7f5aaebfb7a97ec9fa Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Thu, 10 Apr 2014 13:17:20 -0400 Subject: [PATCH] go.tools/.hgignore: don't ignore test-generated files, clean them up. (Includes rollback of CL 83680043.) LGTM=gri R=gri CC=golang-codereviews, rsc https://golang.org/cl/86430045 --- .hgignore | 3 +-- oracle/oracle_test.go | 1 + refactor/eg/eg_test.go | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.hgignore b/.hgignore index 9281c5e1..c27ee1ef 100644 --- a/.hgignore +++ b/.hgignore @@ -1,4 +1,3 @@ -# Add no patterns to .hgignore except for files generated by 'go build'/'go test'. +# Add no patterns to .hgignore except for files generated by the build. syntax:glob last-change -*.got diff --git a/oracle/oracle_test.go b/oracle/oracle_test.go index cd63398b..9a0a7e46 100644 --- a/oracle/oracle_test.go +++ b/oracle/oracle_test.go @@ -234,6 +234,7 @@ func TestOracle(t *testing.T) { continue } defer gotfh.Close() + defer os.Remove(got) // Run the oracle on each query, redirecting its output // and error (if any) to the foo.got file. diff --git a/refactor/eg/eg_test.go b/refactor/eg/eg_test.go index 38174029..fa5bcc11 100644 --- a/refactor/eg/eg_test.go +++ b/refactor/eg/eg_test.go @@ -119,6 +119,7 @@ func Test(t *testing.T) { if err := eg.WriteAST(iprog.Fset, got, file); err != nil { t.Error(err) } + defer os.Remove(got) // Compare foo.got with foo.golden. var cmd *exec.Cmd