Commit 3c807301 by Ben Clayton

Kokoro: Build yarn, run unit tests

Bug: b/139010488 Change-Id: I9ea07d945a9dae6f9b92c283be0052ee68865be2 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34809Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 30b6b59d
// 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
...@@ -15,18 +15,17 @@ if [[ -z "${REACTOR_BACKEND}" ]]; then ...@@ -15,18 +15,17 @@ if [[ -z "${REACTOR_BACKEND}" ]]; then
REACTOR_BACKEND="LLVM" REACTOR_BACKEND="LLVM"
fi 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) make --jobs=$(nproc)
# Run the reactor unit tests. # Run unit tests
./ReactorUnitTests
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 build/gles-unittests
if [ "${REACTOR_BACKEND}" != "Subzero" ]; then if [ "${REACTOR_BACKEND}" != "Subzero" ]; then
# Currently vulkan does not work with Subzero. build/vk-unittests # Currently vulkan does not work with Subzero.
build/vk-unittests
fi fi
\ No newline at end of file
...@@ -17,17 +17,20 @@ SET CONFIG=Debug ...@@ -17,17 +17,20 @@ SET CONFIG=Debug
cd %SRC%\build cd %SRC%\build
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! 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! if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
%MSBUILD% /p:Configuration=%CONFIG% SwiftShader.sln %MSBUILD% /p:Configuration=%CONFIG% SwiftShader.sln
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! 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% cd %SRC%
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
SET SWIFTSHADER_DISABLE_DEBUGGER_WAIT_DIALOG=1 SET SWIFTSHADER_DISABLE_DEBUGGER_WAIT_DIALOG=1
build\Debug\yarn-unittests.exe
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
build\Debug\gles-unittests.exe build\Debug\gles-unittests.exe
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
......
...@@ -15,18 +15,17 @@ if [[ -z "${REACTOR_BACKEND}" ]]; then ...@@ -15,18 +15,17 @@ if [[ -z "${REACTOR_BACKEND}" ]]; then
REACTOR_BACKEND="LLVM" REACTOR_BACKEND="LLVM"
fi 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) make -j$(sysctl -n hw.logicalcpu)
# Run the reactor unit tests. # Run unit tests
./ReactorUnitTests
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 build/gles-unittests
if [ "${REACTOR_BACKEND}" != "Subzero" ]; then if [ "${REACTOR_BACKEND}" != "Subzero" ]; then
# Currently vulkan does not work with Subzero. build/vk-unittests # Currently vulkan does not work with Subzero.
build/vk-unittests
fi fi
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