| # Copyright 2020 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/config/fuchsia/zircon.gni") |
| |
| zircon_fuzzers = |
| read_file("$zircon_root_build_dir/legacy_fuzzers-$target_cpu.json", "json") |
| |
| # When removing an element from this list, add the GN build equivalent to: |
| # _migrated_fuzzers in //garnet/tests/zircon/BUILD.gn. |
| fuzzer_names = [] |
| known_fuzzers = [] |
| foreach(fuzzer, fuzzer_names) { |
| known_fuzzers += [ |
| "$fuzzer-fuzzer.asan", |
| "$fuzzer-fuzzer.asan-ubsan", |
| "$fuzzer-fuzzer.ubsan", |
| ] |
| } |
| |
| # Check that the lists are identical. |
| foreach(fuzzer, known_fuzzers) { |
| assert(zircon_fuzzers + [ fuzzer ] - [ fuzzer ] != zircon_fuzzers, |
| "Fuzzer missing from ZN: $fuzzer") |
| } |
| foreach(fuzzer, zircon_fuzzers) { |
| assert(known_fuzzers + [ fuzzer ] - [ fuzzer ] != known_fuzzers, |
| "New fuzzer not accounted for: $fuzzer") |
| } |
| |
| copy("legacy_manifest") { |
| sources = [ "$zircon_root_build_dir/legacy_fuzzers-$target_cpu.json" ] |
| outputs = [ "$root_build_dir/legacy_zircon_fuzzers.json" ] |
| } |
| |
| group("fuzzing") { |
| deps = [ ":legacy_manifest" ] |
| } |