Commit 2c9aa76e by Ben Clayton

Regres: Write logs to /dev/null

There's no point writing these to disk, we just overwrite them with the next test. Unfortunately there's no way to actually disable writing these files. Think green! Save a SSD! Change-Id: Ib4f7f9417839acf491eac1828bbae7b067988e06 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44015Tested-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
parent 56571062
...@@ -293,7 +293,11 @@ func (c *Config) TestRoutine(exe string, tests <-chan string, results chan<- Tes ...@@ -293,7 +293,11 @@ func (c *Config) TestRoutine(exe string, tests <-chan string, results chan<- Tes
env = cov.AppendRuntimeEnv(env, coverageFile) env = cov.AppendRuntimeEnv(env, coverageFile)
} }
} }
logPath := filepath.Join(c.TempDir, fmt.Sprintf("%v.log", goroutineIndex))
logPath := "/dev/null" // TODO(bclayton): Try "nul" on windows.
if !util.IsFile(logPath) {
logPath = filepath.Join(c.TempDir, fmt.Sprintf("%v.log", goroutineIndex))
}
nextTest: nextTest:
for name := range tests { for name := range tests {
...@@ -316,7 +320,7 @@ nextTest: ...@@ -316,7 +320,7 @@ nextTest:
} }
var coverage *cov.Coverage var coverage *cov.Coverage
if c.CoverageEnv != nil && supportsCoverage { // IsFile() check here is for GLES tests that don't emit coverage. if c.CoverageEnv != nil && supportsCoverage {
coverage, err = c.CoverageEnv.Import(coverageFile) coverage, err = c.CoverageEnv.Import(coverageFile)
if err != nil { if err != nil {
log.Printf("Warning: Failed to process test coverage for test '%v'. %v", name, err) log.Printf("Warning: Failed to process test coverage for test '%v'. %v", name, err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment