From: Ben Clayton Date: Wed, 3 Apr 2019 11:03:28 +0000 (+0100) Subject: Regres: Changes to reduce timeouts X-Git-Tag: android-x86-9.0-r1~24 X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fexternal-swiftshader.git;a=commitdiff_plain;h=e83248c4cbfa05fa60892f14c852b8668e3d1e00 Regres: Changes to reduce timeouts * Shuffle the test lists to mix heavy-load tests with lighter ones. * Bump the test timeout to 10 minutes. Change-Id: I886b08993a39ce78fd198ac4a1ce06f7378dbb20 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/28349 Tested-by: Ben Clayton Reviewed-by: Nicolas Capens --- diff --git a/tests/regres/main.go b/tests/regres/main.go index 5c885c4df..257167d73 100644 --- a/tests/regres/main.go +++ b/tests/regres/main.go @@ -31,6 +31,7 @@ import ( "flag" "fmt" "log" + "math/rand" "os" "os/exec" "path/filepath" @@ -57,7 +58,7 @@ const ( dataVersion = 1 changeUpdateFrequency = time.Minute * 5 changeQueryFrequency = time.Minute * 5 - testTimeout = time.Minute * 5 // timeout for a single test + testTimeout = time.Minute * 10 // timeout for a single test buildTimeout = time.Minute * 10 // timeout for a build dailyUpdateTestListHour = 5 // 5am fullTestListRelPath = "tests/regres/full-tests.json" @@ -783,8 +784,15 @@ func (t *test) run(testLists testlist.Lists) (*CommitTestResults, error) { }() } + // Shuffle the test list. + // This attempts to mix heavy-load tests with lighter ones. + shuffled := make([]string, len(list.Tests)) + for i, j := range rand.New(rand.NewSource(42)).Perm(len(list.Tests)) { + shuffled[i] = list.Tests[j] + } + // Hand the tests to the deqpTestRoutines. - for _, t := range list.Tests { + for _, t := range shuffled { tests <- t }