| 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_config_and_dict", | 15 ":test_config_and_dict", |
| 16 ":test_config_and_seed_corpus", |
| 17 ":test_config_and_seed_corpuses", |
| 16 ":test_config_only", | 18 ":test_config_only", |
| 17 ":test_dict_from_subdir", | 19 ":test_dict_from_subdir", |
| 18 ":test_dict_only", | 20 ":test_dict_only", |
| 19 "//base", | 21 "//base", |
| 20 "//testing/gmock", | 22 "//testing/gmock", |
| 21 "//testing/gtest", | 23 "//testing/gtest", |
| 22 "//testing/gtest:gtest_main", | 24 "//testing/gtest:gtest_main", |
| 23 ] | 25 ] |
| 24 data_deps = [ | 26 data_deps = [ |
| 25 ":check_fuzzer_config", | 27 ":check_fuzzer_config", |
| 28 ":check_seed_corpus_archive", |
| 26 ] | 29 ] |
| 27 } | 30 } |
| 28 | 31 |
| 29 fuzzer_test("test_dict_only") { | 32 fuzzer_test("test_dict_only") { |
| 30 sources = [ | 33 sources = [ |
| 31 "../fuzzers/empty_fuzzer.cc", | 34 "../fuzzers/empty_fuzzer.cc", |
| 32 ] | 35 ] |
| 33 dict = "test.dict" | 36 dict = "test.dict" |
| 34 } | 37 } |
| 35 | 38 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 48 "../fuzzers/empty_fuzzer.cc", | 51 "../fuzzers/empty_fuzzer.cc", |
| 49 ] | 52 ] |
| 50 dict = "test.dict" | 53 dict = "test.dict" |
| 51 libfuzzer_options = [ | 54 libfuzzer_options = [ |
| 52 "max_len=random(1337, 31337)", | 55 "max_len=random(1337, 31337)", |
| 53 "timeout = 666", | 56 "timeout = 666", |
| 54 "use_traces=1", | 57 "use_traces=1", |
| 55 ] | 58 ] |
| 56 } | 59 } |
| 57 | 60 |
| 61 fuzzer_test("test_config_and_seed_corpus") { |
| 62 sources = [ |
| 63 "../fuzzers/empty_fuzzer.cc", |
| 64 ] |
| 65 seed_corpus = "test_corpus" |
| 66 libfuzzer_options = [ |
| 67 "some_test_option=test_value", |
| 68 "max_len=1024", |
| 69 ] |
| 70 } |
| 71 |
| 72 fuzzer_test("test_config_and_seed_corpuses") { |
| 73 sources = [ |
| 74 "../fuzzers/empty_fuzzer.cc", |
| 75 ] |
| 76 seed_corpuses = [ |
| 77 "test_corpus", |
| 78 "test_corpus_2", |
| 79 ] |
| 80 libfuzzer_options = [ |
| 81 "some_test_option=another_test_value", |
| 82 "max_len=1337", |
| 83 ] |
| 84 } |
| 85 |
| 58 fuzzer_test("test_dict_from_subdir") { | 86 fuzzer_test("test_dict_from_subdir") { |
| 59 sources = [ | 87 sources = [ |
| 60 "../fuzzers/empty_fuzzer.cc", | 88 "../fuzzers/empty_fuzzer.cc", |
| 61 ] | 89 ] |
| 62 dict = "dicts_subdir/test_subdir.dict" | 90 dict = "dicts_subdir/test_subdir.dict" |
| 63 } | 91 } |
| 64 | 92 |
| 65 copy("check_fuzzer_config") { | 93 copy("check_fuzzer_config") { |
| 66 sources = [ | 94 sources = [ |
| 67 "check_fuzzer_config.py", | 95 "check_fuzzer_config.py", |
| 68 ] | 96 ] |
| 69 outputs = [ | 97 outputs = [ |
| 70 "$root_build_dir/check_fuzzer_config.py", | 98 "$root_build_dir/check_fuzzer_config.py", |
| 71 ] | 99 ] |
| 72 } | 100 } |
| 101 |
| 102 copy("check_seed_corpus_archive") { |
| 103 sources = [ |
| 104 "check_seed_corpus_archive.py", |
| 105 ] |
| 106 outputs = [ |
| 107 "$root_build_dir/check_seed_corpus_archive.py", |
| 108 ] |
| 109 } |
| OLD | NEW |