blob: 4a0ffe46540dcf44936953bcdae734fbc51afed9 [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.gni")
import("//build/dist/component_manifest_resources.gni")
import("//build/test.gni")
test("profile") {
output_name = "profile-test"
sources = [ "profile.cc" ]
deps = [
"//sdk/fidl/fuchsia.scheduler:fuchsia.scheduler_c",
"//sdk/lib/fdio",
"//zircon/system/ulib/profile",
"//zircon/system/ulib/zx",
"//zircon/system/ulib/zxtest",
]
# TODO(fxbug.dev/95833): This target uses the deprecated C bindings.
# Consider switching to the C++ bindings. See linked bug for details.
configs += [ "//build/c:fidl-deprecated-c-bindings" ]
}
fuchsia_unittest_package("profile-test-pkg") {
manifest = "meta/profile-test.cml"
deps = [ ":profile" ]
}
test("profile-config") {
output_name = "profile-config-test"
sources = [ "profile-config.cc" ]
deps = [
":profile-config-files",
"//sdk/lib/fdio",
"//zircon/system/ulib/profile:config-test",
"//zircon/system/ulib/zx",
"//zircon/system/ulib/zxtest",
]
}
resource("profile-config-files") {
testonly = true
sources = [
"config/bad.extension",
"config/bringup-test.profiles",
"config/core-test.profiles",
"config/error-test.profiles",
"config/invalid-test.profiles",
"config/product-test.profiles",
]
outputs = [ "data/{{source_file_part}}" ]
}
fuchsia_unittest_package("profile-config-test-pkg") {
manifest = "meta/profile-config-test.cml"
deps = [
":profile-config",
":profile-config-files",
]
}
group("tests") {
testonly = true
deps = [
":profile-config-test-pkg",
":profile-test-pkg",
]
}