blob: 017a750e7219b1720d62eb0ea63516e5db79e944 [file] [log] [blame]
# Copyright 2019 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/fuchsia_unittest_package.gni")
import("//build/test.gni")
import("//build/zircon/zx_library.gni")
# Note: The appearance of "sdk" does not mean this will or is intended to be
# in the sdk. It's just the way we export from zircon for use elsewhere.
zx_library("trace-test-utils") {
sdk = "source"
sdk_headers = [
"trace-test-utils/compare_records.h",
"trace-test-utils/fixture.h",
"trace-test-utils/read_records.h",
"trace-test-utils/squelch.h",
"trace-test-utils/fixture_macros.h",
]
testonly = true
sources = [
"compare_records.cc",
"fixture.cc",
"read_records.cc",
"squelch.cc",
]
public_deps = [
"//third_party/re2",
# <trace-test-utils/fixture.h> needs these
"//zircon/system/ulib/async-loop",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/trace-engine",
"//zircon/system/ulib/trace-reader",
]
deps = [
# The kind of engine to use is up to the client, so we don't provide any
# trace-engine dependency here.
"//zircon/system/ulib/async-loop",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/trace-provider:trace-handler",
"//zircon/system/ulib/trace-reader",
"//zircon/system/ulib/zx",
]
}
source_set("trace_fixture_test") {
testonly = true
sources = [ "trace_fixture_test.cc" ]
deps = [
"//third_party/googletest:gtest",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-test-utils",
]
}
test("trace_fixture_tests") {
testonly = true
deps = [
":trace_fixture_test",
"//src/lib/fxl/test:gtest_main",
]
}
fuchsia_unittest_package("trace_fixture") {
deps = [ ":trace_fixture_tests" ]
}
group("tests") {
testonly = true
deps = [ ":trace_fixture" ]
}