From 4266159c110578abcb844d003c034cf15a8d9504 Mon Sep 17 00:00:00 2001 From: Shengzhe Yao Date: Mon, 24 Aug 2015 10:51:40 -0700 Subject: [PATCH] ask test.go to output absolute path for output file --- test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test.go b/test.go index 887506cdda..7d3f36858b 100755 --- a/test.go +++ b/test.go @@ -349,8 +349,9 @@ func main() { test.logf("%s\n", output) } outFile := fmt.Sprintf("%v-%v.%v.log", test.name, test.runIndex+1, try) - test.logf("saving test output to %v", outFile) - if fileErr := ioutil.WriteFile(path.Join(outDir, outFile), output, os.FileMode(0644)); fileErr != nil { + outFilePath := path.Join(outDir, outFile) + test.logf("saving test output to %v", outFilePath) + if fileErr := ioutil.WriteFile(outFilePath, output, os.FileMode(0644)); fileErr != nil { test.logf("WriteFile error: %v", fileErr) } }