]> Cypherpunks repositories - gostls13.git/commitdiff
test: move empty header file in builddir, buildrundir to temp directory
authorEmmanuel T Odeke <emmanuel@orijtech.com>
Tue, 13 Nov 2018 23:13:42 +0000 (16:13 -0700)
committerEmmanuel Odeke <emm.odeke@gmail.com>
Wed, 14 Nov 2018 00:22:40 +0000 (00:22 +0000)
Move the empty header file created by "builddir", "buildrundir"
directives to t.tempDir. The file was accidentally placed in the
same directory as the source code and this was a vestige of CL 146999.

Fixes #28781

Change-Id: I3d2ada5f9e8bf4ce4f015b9bd379b311592fe3ce
Reviewed-on: https://go-review.googlesource.com/c/149458
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
test/run.go

index a01fd6a9574ce5e453f757c1db283bc927290d09..3a9e267940f250e07539fe0dff36dff06869c921 100644 (file)
@@ -808,7 +808,8 @@ func (t *test) run() {
 
                }
                if len(asms) > 0 {
-                       if err := ioutil.WriteFile(filepath.Join(longdir, "go_asm.h"), nil, 0666); err != nil {
+                       emptyHdrFile := filepath.Join(t.tempDir, "go_asm.h")
+                       if err := ioutil.WriteFile(emptyHdrFile, nil, 0666); err != nil {
                                t.err = fmt.Errorf("write empty go_asm.h: %s", err)
                                return
                        }