Kokoro: Build yarn, run unit tests

Bug: b/139010488
Change-Id: I9ea07d945a9dae6f9b92c283be0052ee68865be2
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34809
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/src/Yarn/Yarn.cpp b/src/Yarn/Yarn.cpp
new file mode 100644
index 0000000..154d205
--- /dev/null
+++ b/src/Yarn/Yarn.cpp
@@ -0,0 +1,17 @@
+// Copyright 2019 The SwiftShader Authors. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// A dummy function and file.
+// Will be removed once there's some library code to compile.
+void dummy() {}
\ No newline at end of file
diff --git a/tests/kokoro/gcp_ubuntu/continuous.sh b/tests/kokoro/gcp_ubuntu/continuous.sh
index bc443c5..8800710 100644
--- a/tests/kokoro/gcp_ubuntu/continuous.sh
+++ b/tests/kokoro/gcp_ubuntu/continuous.sh
@@ -15,18 +15,17 @@
   REACTOR_BACKEND="LLVM"
 fi
 
-cmake .. "-DREACTOR_BACKEND=${REACTOR_BACKEND}" "-DREACTOR_VERIFY_LLVM_IR=1"
+cmake .. "-DREACTOR_BACKEND=${REACTOR_BACKEND}" "-DREACTOR_VERIFY_LLVM_IR=1" "-DBUILD_YARN=1"
 make --jobs=$(nproc)
 
-# Run the reactor unit tests.
-./ReactorUnitTests
+# Run unit tests
 
-cd .. # Tests must be run from project root
+cd .. # Some tests must be run from project root
 
-# Run the OpenGL ES and Vulkan unit tests.
+build/ReactorUnitTests
+build/yarn-unittests
 build/gles-unittests
 
 if [ "${REACTOR_BACKEND}" != "Subzero" ]; then
-  # Currently vulkan does not work with Subzero.
-  build/vk-unittests
-fi
+  build/vk-unittests # Currently vulkan does not work with Subzero.
+fi
\ No newline at end of file
diff --git a/tests/kokoro/gcp_windows/continuous.bat b/tests/kokoro/gcp_windows/continuous.bat
index c8b1f1c..e6dc2ec 100644
--- a/tests/kokoro/gcp_windows/continuous.bat
+++ b/tests/kokoro/gcp_windows/continuous.bat
@@ -17,17 +17,20 @@
 cd %SRC%\build
 if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
 
-cmake .. -G "Visual Studio 15 2017 Win64" -Thost=x64 "-DREACTOR_BACKEND=%REACTOR_BACKEND%" "-DREACTOR_VERIFY_LLVM_IR=1"
+cmake .. -G "Visual Studio 15 2017 Win64" -Thost=x64 "-DREACTOR_BACKEND=%REACTOR_BACKEND%" "-DREACTOR_VERIFY_LLVM_IR=1" "-DBUILD_YARN=1"
 if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
 
 %MSBUILD% /p:Configuration=%CONFIG% SwiftShader.sln
 if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
 
-REM Run the unit tests. They must be run from project root
+REM Run the unit tests. Some must be run from project root
 cd %SRC%
 if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
 SET SWIFTSHADER_DISABLE_DEBUGGER_WAIT_DIALOG=1
 
+build\Debug\yarn-unittests.exe
+if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
+
 build\Debug\gles-unittests.exe
 if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
 
diff --git a/tests/kokoro/macos/continuous.sh b/tests/kokoro/macos/continuous.sh
index 9dc1d85..8d7a92b 100755
--- a/tests/kokoro/macos/continuous.sh
+++ b/tests/kokoro/macos/continuous.sh
@@ -15,18 +15,17 @@
   REACTOR_BACKEND="LLVM"
 fi
 
-cmake .. "-DASAN=ON -DREACTOR_BACKEND=${REACTOR_BACKEND} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DREACTOR_VERIFY_LLVM_IR=1"
+cmake .. "-DASAN=ON" "-DREACTOR_BACKEND=${REACTOR_BACKEND}" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DREACTOR_VERIFY_LLVM_IR=1" "-DBUILD_YARN=1"
 make -j$(sysctl -n hw.logicalcpu)
 
-# Run the reactor unit tests.
-./ReactorUnitTests
+# Run unit tests
 
-cd .. # Tests must be run from project root
+cd .. # Some tests must be run from project root
 
-# Run the OpenGL ES and Vulkan unit tests.
+build/ReactorUnitTests
+build/yarn-unittests
 build/gles-unittests
 
 if [ "${REACTOR_BACKEND}" != "Subzero" ]; then
-  # Currently vulkan does not work with Subzero.
-  build/vk-unittests
+  build/vk-unittests # Currently vulkan does not work with Subzero.
 fi