xref: /aosp_15_r20/external/swiftshader/tests/ReactorUnitTests/BUILD.gn (revision 03ce13f70fcc45d86ee91b7ee4cab1936a95046e)
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      "ReactorSIMD.cpp",
33      "ReactorUnitTests.cpp",
34    ]
35
36    include_dirs = [
37      "../../src/Reactor"
38    ]
39  }
40}
41
42if (supports_subzero) {
43  test("swiftshader_reactor_subzero_unittests") {
44    deps = [
45      "//base",
46      "//base/test:test_support",
47      "//testing/gmock",
48      "//testing/gtest",
49      "//third_party/swiftshader/src/Reactor:swiftshader_subzero_reactor",
50    ]
51
52    configs += [ "//third_party/swiftshader:swiftshader_config" ]
53
54    sources = [
55      "//gpu/swiftshader_tests_main.cc",
56      "ReactorSIMD.cpp",
57      "ReactorUnitTests.cpp",
58    ]
59
60    include_dirs = [
61      "../../src/Reactor"
62    ]
63  }
64}