| # Copyright 2021 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 = [ ":inspector-gwp-asan-test-pkg" ] |
| } |
| |
| test("inspector-gwp-asan-test") { |
| # Whether GWP-ASan is enabled. |
| has_gwp_asan = toolchain_variant.tags + [ "replaces-allocator" ] - |
| [ "replaces-allocator" ] == toolchain_variant.tags |
| |
| sources = [ "gwp-asan-test.cc" ] |
| defines = [ "HAS_GWP_ASAN=$has_gwp_asan" ] |
| deps = [ |
| "..:gwp-asan", |
| "//sdk/lib/fdio", |
| "//sdk/lib/fit", |
| "//zircon/system/ulib/c/scudo:gwp-asan-common", |
| "//zircon/system/ulib/zx", |
| "//zircon/system/ulib/zxtest", |
| ] |
| data_deps = [ |
| "//zircon/system/ulib/c/test:gwp-asan-test-buffer-overflow", |
| "//zircon/system/ulib/c/test:gwp-asan-test-buffer-underflow", |
| "//zircon/system/ulib/c/test:gwp-asan-test-double-free", |
| "//zircon/system/ulib/c/test:gwp-asan-test-invalid-free", |
| "//zircon/system/ulib/c/test:gwp-asan-test-use-after-free", |
| ] |
| } |
| |
| fuchsia_unittest_package("inspector-gwp-asan-test-pkg") { |
| manifest = "gwp-asan-test.cml" |
| deps = [ ":inspector-gwp-asan-test" ] |
| } |