blob: f730f649676db12e2a9e8a3265e60c57e3af7ea0 [file] [log] [blame] [edit]
# 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.
##########################################
# 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/fuzzing/fuzzer.gni")
import("//build/test.gni")
import("//src/sys/build/fuchsia_unittest_package.gni")
group("tests") {
testonly = true
deps = [
":affine-fuzzers-pkg",
":affine-test-pkg",
]
}
test("affine") {
output_name = "affine-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
}
}
sources = [
"ratio.cc",
"transform.cc",
"utils.cc",
]
deps = [
"//sdk/lib/fdio",
"//zircon/public/lib/fit",
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/affine",
]
# TODO(fxbug.dev/41888): UBSan has found an instance of undefined behavior in this target.
# Disable UBSan for this target temporarily until it is migrated into CI/CQ.
configs += [ "//build/config:temporarily_disable_ubsan_do_not_use" ]
}
fuchsia_unittest_package("affine-test-pkg") {
executable_path = "test/affine-test"
deps = [ ":affine" ]
}
fuzzer("affine-fuzzer") {
sources = [ "affine-fuzzer.cc" ]
deps = [ "//zircon/system/ulib/affine" ]
}
fuzzers_package("affine-fuzzers-pkg") {
cpp_fuzzers = [ ":affine-fuzzer" ]
}