Commit 2e96bac8 by Ben Clayton

Regres: Transition from out/ to build/

Change-Id: I9274f2141f14959ba614b57d45a637232baad5c8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27469Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 2a55a56a
...@@ -652,7 +652,6 @@ func (r *regres) newTest(commit git.Hash) *test { ...@@ -652,7 +652,6 @@ func (r *regres) newTest(commit git.Hash) *test {
commit: commit, commit: commit,
srcDir: srcDir, srcDir: srcDir,
resDir: resDir, resDir: resDir,
outDir: filepath.Join(srcDir, "out"),
buildDir: filepath.Join(srcDir, "build"), buildDir: filepath.Join(srcDir, "build"),
} }
} }
...@@ -662,7 +661,6 @@ type test struct { ...@@ -662,7 +661,6 @@ type test struct {
commit git.Hash // hash of the commit to test commit git.Hash // hash of the commit to test
srcDir string // directory for the SwiftShader checkout srcDir string // directory for the SwiftShader checkout
resDir string // directory for the test results resDir string // directory for the test results
outDir string // directory for SwiftShader output
buildDir string // directory for SwiftShader build buildDir string // directory for SwiftShader build
keepCheckouts bool // don't delete source & build checkouts after testing keepCheckouts bool // don't delete source & build checkouts after testing
} }
...@@ -735,6 +733,16 @@ func (t *test) build() error { ...@@ -735,6 +733,16 @@ func (t *test) build() error {
// run runs all the tests. // run runs all the tests.
func (t *test) run(testLists testlist.Lists) (*CommitTestResults, error) { func (t *test) run(testLists testlist.Lists) (*CommitTestResults, error) {
log.Printf("Running tests for '%s'\n", t.commit) log.Printf("Running tests for '%s'\n", t.commit)
outDir := filepath.Join(t.srcDir, "out")
if !isDir(outDir) { // https://swiftshader-review.googlesource.com/c/SwiftShader/+/27188
outDir = t.buildDir
}
if !isDir(outDir) {
return nil, fmt.Errorf("Couldn't find output directory")
}
log.Println("outDir:", outDir)
start := time.Now() start := time.Now()
// Wait group that completes once all the tests have finished. // Wait group that completes once all the tests have finished.
...@@ -770,7 +778,7 @@ func (t *test) run(testLists testlist.Lists) (*CommitTestResults, error) { ...@@ -770,7 +778,7 @@ func (t *test) run(testLists testlist.Lists) (*CommitTestResults, error) {
wg.Add(numParallelTests) wg.Add(numParallelTests)
for i := 0; i < numParallelTests; i++ { for i := 0; i < numParallelTests; i++ {
go func() { go func() {
t.deqpTestRoutine(exe, tests, results) t.deqpTestRoutine(exe, outDir, tests, results)
wg.Done() wg.Done()
}() }()
} }
...@@ -1108,13 +1116,13 @@ var ( ...@@ -1108,13 +1116,13 @@ var (
// is written to results. // is written to results.
// deqpTestRoutine only returns once the tests chan has been closed. // deqpTestRoutine only returns once the tests chan has been closed.
// deqpTestRoutine does not close the results chan. // deqpTestRoutine does not close the results chan.
func (t *test) deqpTestRoutine(exe string, tests <-chan string, results chan<- TestResult) { func (t *test) deqpTestRoutine(exe, outDir string, tests <-chan string, results chan<- TestResult) {
nextTest: nextTest:
for name := range tests { for name := range tests {
// log.Printf("Running test '%s'\n", name) // log.Printf("Running test '%s'\n", name)
env := []string{ env := []string{
"LD_LIBRARY_PATH=" + t.buildDir + ":" + os.Getenv("LD_LIBRARY_PATH"), "LD_LIBRARY_PATH=" + t.buildDir + ":" + os.Getenv("LD_LIBRARY_PATH"),
"VK_ICD_FILENAMES=" + filepath.Join(t.outDir, "Linux", "vk_swiftshader_icd.json"), "VK_ICD_FILENAMES=" + filepath.Join(outDir, "Linux", "vk_swiftshader_icd.json"),
"DISPLAY=" + os.Getenv("DISPLAY"), "DISPLAY=" + os.Getenv("DISPLAY"),
"LIBC_FATAL_STDERR_=1", // Put libc explosions into logs. "LIBC_FATAL_STDERR_=1", // Put libc explosions into logs.
} }
......
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