blob: bf60a824de3105084ffebe0089bc166c81684659 [file] [log] [blame] [edit]
# Copyright 2020 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.
##########################################
# Though under //zircon, this build file #
# is meant to be used in the Fuchsia GN #
# build. #
# See fxbug.dev/36139. #
##########################################
assert(!defined(zx) || zx != "/",
"This file can only be used in the Fuchsia GN build.")
import("//build/test.gni")
import("//src/sys/build/fuchsia_unittest_package.gni")
group("test") {
testonly = true
deps = [ ":provider-test" ]
}
test("provider-test") {
if (is_fuchsia) {
configs += [ "//build/unification/config:zircon-migrated" ]
}
if (is_fuchsia) {
fdio_config = [ "//build/config/fuchsia:fdio_config" ]
if (configs + fdio_config - fdio_config != configs) {
configs -= fdio_config
}
}
visibility = [ ":*" ]
output_name = "trace-provider-test"
sources = [
"../fnv1hash.h",
"../session.h",
"fake_trace_manager.cc",
"fake_trace_manager.h",
"provider_test.cc",
"session_test.cc",
]
deps = [
"//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider_c",
"//sdk/lib/fdio",
"//zircon/public/lib/async-cpp",
"//zircon/public/lib/fidl",
"//zircon/public/lib/zx",
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fidl:fidl_base",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-provider",
]
}
fuchsia_unittest_package("provider-test-pkg") {
package_name = "trace-provider-test"
executable_path = "test/trace-provider-test"
deps = [ ":provider-test" ]
}
group("tests") {
testonly = true
deps = [ ":provider-test-pkg" ]
}