OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 # | 4 # |
5 # Fuzzing Infrastructure Tests | 5 # Fuzzing Infrastructure Tests |
6 | 6 |
7 import("//testing/test.gni") | 7 import("//testing/test.gni") |
8 import("//testing/libfuzzer/fuzzer_test.gni") | 8 import("//testing/libfuzzer/fuzzer_test.gni") |
9 | 9 |
10 test("libfuzzer_tests") { | 10 test("libfuzzer_tests") { |
11 sources = [ | 11 sources = [ |
12 "fuzzer_launcher_test.cc", | 12 "fuzzer_launcher_test.cc", |
13 ] | 13 ] |
14 deps = [ | 14 deps = [ |
15 ":test_dict_launcher.sh", | 15 ":test_config_and_dict", |
| 16 ":test_config_only", |
| 17 ":test_dict_from_subdir", |
| 18 ":test_dict_only", |
16 "//base", | 19 "//base", |
17 "//testing/gmock", | 20 "//testing/gmock", |
18 "//testing/gtest", | 21 "//testing/gtest", |
19 "//testing/gtest:gtest_main", | 22 "//testing/gtest:gtest_main", |
20 ] | 23 ] |
21 data_deps = [ | 24 data_deps = [ |
22 ":print_args", | 25 ":check_fuzzer_config", |
23 ] | 26 ] |
24 } | 27 } |
25 | 28 |
26 fuzzer_test_launcher("test_dict_launcher.sh") { | 29 fuzzer_test("test_dict_only") { |
27 fuzzer_name = "print_args.py" | 30 sources = [ |
28 dict = "test_dict" | 31 "../fuzzers/empty_fuzzer.cc", |
| 32 ] |
| 33 dict = "test.dict" |
29 } | 34 } |
30 | 35 |
31 copy("print_args") { | 36 fuzzer_test("test_config_only") { |
32 sources = [ | 37 sources = [ |
33 "print_args.py", | 38 "../fuzzers/empty_fuzzer.cc", |
| 39 ] |
| 40 libfuzzer_options = "fuzzer_config_only_test.options" |
| 41 } |
| 42 |
| 43 fuzzer_test("test_config_and_dict") { |
| 44 sources = [ |
| 45 "../fuzzers/empty_fuzzer.cc", |
| 46 ] |
| 47 dict = "test.dict" |
| 48 libfuzzer_options = "fuzzer_config_and_dict_test.options" |
| 49 } |
| 50 |
| 51 fuzzer_test("test_dict_from_subdir") { |
| 52 sources = [ |
| 53 "../fuzzers/empty_fuzzer.cc", |
| 54 ] |
| 55 dict = "dicts_subdir/test_subdir.dict" |
| 56 } |
| 57 |
| 58 copy("check_fuzzer_config") { |
| 59 sources = [ |
| 60 "check_fuzzer_config.py", |
34 ] | 61 ] |
35 outputs = [ | 62 outputs = [ |
36 "$root_build_dir/print_args.py", | 63 "$root_build_dir/check_fuzzer_config.py", |
37 ] | 64 ] |
38 } | 65 } |
OLD | NEW |