1# Copyright 2020 The SwiftShader Authors. All Rights Reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15import("//testing/test.gni") 16import("../../src/Reactor/reactor.gni") 17 18if (supports_llvm) { 19 test("swiftshader_reactor_llvm_unittests") { 20 deps = [ 21 "//base", 22 "//base/test:test_support", 23 "//testing/gmock", 24 "//testing/gtest", 25 "//third_party/swiftshader/src/Reactor:swiftshader_llvm_reactor", 26 ] 27 28 configs += [ "//third_party/swiftshader:swiftshader_config" ] 29 30 sources = [ 31 "//gpu/swiftshader_tests_main.cc", 32 "ReactorUnitTests.cpp", 33 ] 34 35 include_dirs = [ 36 "../../src/Reactor" 37 ] 38 } 39} 40 41if (supports_subzero) { 42 test("swiftshader_reactor_subzero_unittests") { 43 deps = [ 44 "//base", 45 "//base/test:test_support", 46 "//testing/gmock", 47 "//testing/gtest", 48 "//third_party/swiftshader/src/Reactor:swiftshader_subzero_reactor", 49 ] 50 51 configs += [ "//third_party/swiftshader:swiftshader_config" ] 52 53 sources = [ 54 "//gpu/swiftshader_tests_main.cc", 55 "ReactorUnitTests.cpp", 56 ] 57 58 include_dirs = [ 59 "../../src/Reactor" 60 ] 61 } 62}