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 <bclayton@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/tests/regres/main.go b/tests/regres/main.go
index 5c885c4..257167d 100644
--- a/tests/regres/main.go
+++ b/tests/regres/main.go
@@ -31,6 +31,7 @@
 	"flag"
 	"fmt"
 	"log"
+	"math/rand"
 	"os"
 	"os/exec"
 	"path/filepath"
@@ -57,7 +58,7 @@
 	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 @@
 			}()
 		}
 
+		// 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
 		}