blob: 911d27c992ee4b9b39d65d124e24cf424f958f49 [file] [log] [blame]
# Copyright 2021 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/components.gni")
group("tests") {
testonly = true
deps = [ ":opencl_loader_tests" ]
}
executable("test_bin") {
testonly = true
output_name = "opencl_loader_test"
sources = [ "test.cc" ]
deps = [
"//sdk/fidl/fuchsia.gpu.magma:fuchsia.gpu.magma_cpp",
"//sdk/fidl/fuchsia.io:fuchsia.io_cpp",
"//sdk/fidl/fuchsia.opencl.loader:fuchsia.opencl.loader_cpp",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_cpp",
"//sdk/lib/fdio",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
"//zircon/system/ulib/fzl",
]
}
executable("unittest_bin") {
testonly = true
output_name = "opencl_loader_unittest"
sources = [ "unittest.cc" ]
deps = [
"..:app",
"//sdk/fidl/fuchsia.io:fuchsia.io_cpp",
"//sdk/fidl/fuchsia.opencl.loader:fuchsia.opencl.loader_cpp",
"//sdk/lib/fdio",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//src/lib/json_parser",
"//src/lib/testing/loop_fixture",
"//src/storage/lib/vfs/cpp",
"//third_party/googletest:gtest",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
executable("opencl-server-bin") {
testonly = true
output_name = "opencl-server"
sources = [ "opencl-server-main.cc" ]
deps = [
"//sdk/fidl/fuchsia.gpu.magma:fuchsia.gpu.magma_cpp",
"//sdk/fidl/fuchsia.io:fuchsia.io_cpp",
"//sdk/fidl/fuchsia.process.lifecycle:fuchsia.process.lifecycle_cpp",
"//src/lib/fxl:fxl_cli",
"//src/storage/lib/vfs/cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
fuchsia_component("opencl_loader_test_driver") {
testonly = true
manifest = "meta/opencl_loader_test_driver.cml"
deps = [ ":test_bin" ]
}
fuchsia_component("opencl_loader_test_lib_provider") {
testonly = true
manifest = "meta/opencl_loader_test_lib_provider.cml"
deps = [ ":opencl-server-bin" ]
}
fuchsia_component("opencl_loader_test") {
testonly = true
manifest = "meta/opencl_loader_test.cml"
}
fuchsia_component("opencl_loader_unittest_driver") {
testonly = true
manifest = "meta/opencl_loader_unittest_driver.cml"
deps = [ ":unittest_bin" ]
}
fuchsia_component("opencl_loader_unittest") {
testonly = true
manifest = "meta/opencl_loader_unittest.cml"
}
resource("metadata") {
sources = [ "metadata.json" ]
outputs = [ "data/test_metadata/metadata.json" ]
}
resource("manifest-json") {
sources = [ "libopencl_fake.json" ]
outputs = [ "data/libopencl_fake.json" ]
}
fuchsia_component("test_opencl_driver") {
testonly = true
manifest = "meta/test_opencl_driver.cml"
deps = [ ":metadata" ]
}
fuchsia_test_package("opencl_loader_tests") {
test_components = [
":opencl_loader_test",
":opencl_loader_unittest",
]
deps = [
":manifest-json",
":opencl_loader_test_driver",
":opencl_loader_test_lib_provider",
":opencl_loader_unittest_driver",
":test_opencl_driver",
"..:opencl_loader_cmp",
]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}