| # 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/python/python_host_test.gni") |
| |
| tests = [ |
| "args", |
| "buildenv", |
| "command", |
| "corpus", |
| "device", |
| "dictionary", |
| "factory", |
| "fuzzer", |
| "host", |
| "namespace", |
| ] |
| |
| foreach(test, tests) { |
| _test_target = "${test}_test" |
| _test_dir = "${root_out_dir}/test_data/" + get_label_info(_test_target, "dir") |
| |
| _data_target = "${_test_target}_data" |
| host_test_data(_data_target) { |
| sources = [ |
| "data/v1.fuzzers.json", |
| "data/v2.fuzzers.json", |
| ] |
| outputs = [ "${_test_dir}/data/{{source_file_part}}" ] |
| } |
| |
| python_host_test(_test_target) { |
| main_source = "${test}_test.py" |
| sources = [ |
| "__init__.py", |
| "factory_fake.py", |
| "host_fake.py", |
| "process_fake.py", |
| "test_case.py", |
| "test_e2e.py", |
| "test_env.py", |
| ] |
| libraries = [ "../lib" ] |
| deps = [ ":${_data_target}" ] |
| test_dir = _test_dir |
| extra_args = [ "-v" ] |
| } |
| } |
| |
| # TODO(https://fxbug.dev/73835): Create test targets for `fx fuzz e2etest`. |
| |
| group("tests") { |
| testonly = true |
| public_deps = [] |
| foreach(t, tests) { |
| public_deps += [ ":${t}_test($host_toolchain)" ] |
| } |
| } |