blob: ad4e15f19fcf7e2305c920a39b31bab940a54504 [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/test.gni")
group("tests") {
testonly = true
deps = [
":fit($host_toolchain)",
":fit-test-pkg",
":fit-unittest($host_toolchain)",
":fit-unittest-pkg",
]
}
test("fit-unittest") {
output_name = "fit-unittest-test"
if (is_fuchsia) {
fdio_config = [ "//build/config/fuchsia:fdio_config" ]
if (configs + fdio_config - fdio_config != configs) {
configs -= fdio_config
}
}
sources = [ "thread_checker_tests.cc" ]
deps = [
"//sdk/lib/fit",
"//zircon/system/ulib/zxtest",
]
configs += [ ":shadow" ]
if (is_fuchsia) {
deps += [ "//sdk/lib/fdio" ]
}
}
# TODO: Convert these to zxtest and move them into the test above.
test("fit") {
if (is_fuchsia) {
fdio_config = [ "//build/config/fuchsia:fdio_config" ]
if (configs + fdio_config - fdio_config != configs) {
configs -= fdio_config
}
}
sources = [
"defer_tests.cc",
"examples/function_example1.cc",
"examples/function_example2.cc",
"function_examples.cc",
"function_tests.cc",
"function_traits_tests.cc",
"inline_any_multi_inheritance_tests.cc",
"inline_any_tests.cc",
"nullable_tests.cc",
"thread_checker_tests.cc",
"traits_tests.cc",
"utility_internal_tests.cc",
]
deps = [
"//sdk/lib/fit",
"//zircon/system/ulib/zxtest",
]
configs += [ ":shadow" ]
if (is_fuchsia) {
deps += [ "//sdk/lib/fdio" ]
}
}
config("shadow") {
# chromium uses this library, and enables the following flag,
# so these tests should work with this flag enabled
cflags_cc = [ "-Wshadow" ]
}
fuchsia_unittest_package("fit-test-pkg") {
package_name = "fit"
deps = [ ":fit" ]
}
fuchsia_unittest_package("fit-unittest-pkg") {
package_name = "fit-unittest-test"
deps = [ ":fit-unittest" ]
}