Kokoro: Split the windows and linux configs

This is done so that we can build for both the subzero and llvm backends.

Old configs remain where they are during a transition period.

Bug: b/130343040
Change-Id: Icc9e1b92074ef90aacfd9e6d40b021d35f4d9ef3
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/28908
Tested-by: Ben Clayton <bclayton@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/tests/kokoro/gcp_ubuntu/continuous.cfg b/tests/kokoro/gcp_ubuntu/continuous.cfg
index fed5c81..420990c 100644
--- a/tests/kokoro/gcp_ubuntu/continuous.cfg
+++ b/tests/kokoro/gcp_ubuntu/continuous.cfg
@@ -1,4 +1,6 @@
 # Format: //devtools/kokoro/config/proto/build.proto
 
+# TODO(b/130343040): REMOVE THIS FILE.
+
 # Location of the continuous bash script in Git.
 build_file: "SwiftShader/tests/kokoro/gcp_ubuntu/continuous.sh"
diff --git a/tests/kokoro/gcp_ubuntu/continuous.sh b/tests/kokoro/gcp_ubuntu/continuous.sh
index 3e93dbc..e889ca3 100644
--- a/tests/kokoro/gcp_ubuntu/continuous.sh
+++ b/tests/kokoro/gcp_ubuntu/continuous.sh
@@ -11,7 +11,11 @@
 
 mkdir -p build && cd build
 
-cmake ..
+if [[ -z "${REACTOR_BACKEND}" ]]; then
+  REACTOR_BACKEND="LLVM"
+fi
+
+cmake .. "-DREACTOR_BACKEND=${REACTOR_BACKEND}"
 make --jobs=$(nproc)
 
 # Run the reactor unit tests.
diff --git a/tests/kokoro/gcp_ubuntu/presubmit.cfg b/tests/kokoro/gcp_ubuntu/presubmit.cfg
index fed5c81..420990c 100644
--- a/tests/kokoro/gcp_ubuntu/presubmit.cfg
+++ b/tests/kokoro/gcp_ubuntu/presubmit.cfg
@@ -1,4 +1,6 @@
 # Format: //devtools/kokoro/config/proto/build.proto
 
+# TODO(b/130343040): REMOVE THIS FILE.
+
 # Location of the continuous bash script in Git.
 build_file: "SwiftShader/tests/kokoro/gcp_ubuntu/continuous.sh"
diff --git a/tests/kokoro/gcp_ubuntu/reactor_llvm/continuous.cfg b/tests/kokoro/gcp_ubuntu/reactor_llvm/continuous.cfg
new file mode 100644
index 0000000..a08f811
--- /dev/null
+++ b/tests/kokoro/gcp_ubuntu/reactor_llvm/continuous.cfg
@@ -0,0 +1,9 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Location of the continuous bash script in Git.
+build_file: "SwiftShader/tests/kokoro/gcp_ubuntu/continuous.sh"
+
+env_vars {
+  key: "REACTOR_BACKEND"
+  value: "LLVM"
+}
diff --git a/tests/kokoro/gcp_ubuntu/reactor_llvm/presubmit.cfg b/tests/kokoro/gcp_ubuntu/reactor_llvm/presubmit.cfg
new file mode 100644
index 0000000..a08f811
--- /dev/null
+++ b/tests/kokoro/gcp_ubuntu/reactor_llvm/presubmit.cfg
@@ -0,0 +1,9 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Location of the continuous bash script in Git.
+build_file: "SwiftShader/tests/kokoro/gcp_ubuntu/continuous.sh"
+
+env_vars {
+  key: "REACTOR_BACKEND"
+  value: "LLVM"
+}
diff --git a/tests/kokoro/gcp_ubuntu/reactor_subzero/continuous.cfg b/tests/kokoro/gcp_ubuntu/reactor_subzero/continuous.cfg
new file mode 100644
index 0000000..e67058e
--- /dev/null
+++ b/tests/kokoro/gcp_ubuntu/reactor_subzero/continuous.cfg
@@ -0,0 +1,9 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Location of the continuous bash script in Git.
+build_file: "SwiftShader/tests/kokoro/gcp_ubuntu/continuous.sh"
+
+env_vars {
+  key: "REACTOR_BACKEND"
+  value: "Subzero"
+}
diff --git a/tests/kokoro/gcp_ubuntu/reactor_subzero/presubmit.cfg b/tests/kokoro/gcp_ubuntu/reactor_subzero/presubmit.cfg
new file mode 100644
index 0000000..e67058e
--- /dev/null
+++ b/tests/kokoro/gcp_ubuntu/reactor_subzero/presubmit.cfg
@@ -0,0 +1,9 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Location of the continuous bash script in Git.
+build_file: "SwiftShader/tests/kokoro/gcp_ubuntu/continuous.sh"
+
+env_vars {
+  key: "REACTOR_BACKEND"
+  value: "Subzero"
+}
diff --git a/tests/kokoro/gcp_windows/continuous.bat b/tests/kokoro/gcp_windows/continuous.bat
index 0008c03..184b17a 100644
--- a/tests/kokoro/gcp_windows/continuous.bat
+++ b/tests/kokoro/gcp_windows/continuous.bat
@@ -9,6 +9,7 @@
 SET MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild"
 SET CONFIG=Debug
 
+REM TODO: Switch between reactor backends with the REACTOR_BACKEND env var.
 %MSBUILD% /p:Configuration=%CONFIG% SwiftShader.sln
 
 SET PATH=%PATH%;T:\src\git\SwiftShader\out\Debug_x64
diff --git a/tests/kokoro/gcp_windows/continuous.cfg b/tests/kokoro/gcp_windows/continuous.cfg
index 7ed57a5..37775b9 100644
--- a/tests/kokoro/gcp_windows/continuous.cfg
+++ b/tests/kokoro/gcp_windows/continuous.cfg
@@ -1,5 +1,7 @@
 # Format: //devtools/kokoro/config/proto/build.proto
 
+# TODO(b/130343040): REMOVE THIS FILE.
+
 # Location of the continuous script in Git.
 build_file: "SwiftShader/tests/kokoro/gcp_windows/continuous.bat"
 
diff --git a/tests/kokoro/gcp_windows/presubmit.cfg b/tests/kokoro/gcp_windows/presubmit.cfg
index 7ed57a5..37775b9 100644
--- a/tests/kokoro/gcp_windows/presubmit.cfg
+++ b/tests/kokoro/gcp_windows/presubmit.cfg
@@ -1,5 +1,7 @@
 # Format: //devtools/kokoro/config/proto/build.proto
 
+# TODO(b/130343040): REMOVE THIS FILE.
+
 # Location of the continuous script in Git.
 build_file: "SwiftShader/tests/kokoro/gcp_windows/continuous.bat"
 
diff --git a/tests/kokoro/gcp_windows/reactor_llvm/continuous.cfg b/tests/kokoro/gcp_windows/reactor_llvm/continuous.cfg
new file mode 100644
index 0000000..e45a3a3
--- /dev/null
+++ b/tests/kokoro/gcp_windows/reactor_llvm/continuous.cfg
@@ -0,0 +1,9 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Location of the continuous script in Git.
+build_file: "SwiftShader/tests/kokoro/gcp_windows/continuous.bat"
+
+env_vars {
+  key: "REACTOR_BACKEND"
+  value: "LLVM"
+}
diff --git a/tests/kokoro/gcp_windows/reactor_llvm/presubmit.cfg b/tests/kokoro/gcp_windows/reactor_llvm/presubmit.cfg
new file mode 100644
index 0000000..e45a3a3
--- /dev/null
+++ b/tests/kokoro/gcp_windows/reactor_llvm/presubmit.cfg
@@ -0,0 +1,9 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Location of the continuous script in Git.
+build_file: "SwiftShader/tests/kokoro/gcp_windows/continuous.bat"
+
+env_vars {
+  key: "REACTOR_BACKEND"
+  value: "LLVM"
+}
diff --git a/tests/kokoro/gcp_windows/reactor_subzero/continuous.cfg b/tests/kokoro/gcp_windows/reactor_subzero/continuous.cfg
new file mode 100644
index 0000000..e62e4e8
--- /dev/null
+++ b/tests/kokoro/gcp_windows/reactor_subzero/continuous.cfg
@@ -0,0 +1,9 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Location of the continuous script in Git.
+build_file: "SwiftShader/tests/kokoro/gcp_windows/continuous.bat"
+
+env_vars {
+  key: "REACTOR_BACKEND"
+  value: "Subzero"
+}
diff --git a/tests/kokoro/gcp_windows/reactor_subzero/presubmit.cfg b/tests/kokoro/gcp_windows/reactor_subzero/presubmit.cfg
new file mode 100644
index 0000000..e62e4e8
--- /dev/null
+++ b/tests/kokoro/gcp_windows/reactor_subzero/presubmit.cfg
@@ -0,0 +1,9 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Location of the continuous script in Git.
+build_file: "SwiftShader/tests/kokoro/gcp_windows/continuous.bat"
+
+env_vars {
+  key: "REACTOR_BACKEND"
+  value: "Subzero"
+}