Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: testing/libfuzzer/fuzzer_test.gni

Issue 2905523002: Reduce absolute paths in generated ninja files (Closed)
Patch Set: revert build/config/gcc/BUILD.gn, rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 # Defines fuzzer_test. 5 # Defines fuzzer_test.
6 # 6 #
7 import("//build/config/features.gni") 7 import("//build/config/features.gni")
8 import("//build/config/sanitizers/sanitizers.gni") 8 import("//build/config/sanitizers/sanitizers.gni")
9 import("//testing/test.gni") 9 import("//testing/test.gni")
10 10
(...skipping 30 matching lines...) Expand all
41 assert(!(defined(invoker.seed_corpus) && defined(invoker.seed_corpuses)), 41 assert(!(defined(invoker.seed_corpus) && defined(invoker.seed_corpuses)),
42 "Do not use both seed_corpus and seed_corpuses for $target_name.") 42 "Do not use both seed_corpus and seed_corpuses for $target_name.")
43 43
44 out = "$root_build_dir/$target_name" + "_seed_corpus.zip" 44 out = "$root_build_dir/$target_name" + "_seed_corpus.zip"
45 45
46 action(target_name + "_seed_corpus") { 46 action(target_name + "_seed_corpus") {
47 script = "//testing/libfuzzer/archive_corpus.py" 47 script = "//testing/libfuzzer/archive_corpus.py"
48 48
49 args = [ 49 args = [
50 "--output", 50 "--output",
51 rebase_path(out), 51 rebase_path(out, root_build_dir),
52 ] 52 ]
53 53
54 if (defined(invoker.seed_corpus)) { 54 if (defined(invoker.seed_corpus)) {
55 args += [ rebase_path(invoker.seed_corpus) ] 55 args += [ rebase_path(invoker.seed_corpus, root_build_dir) ]
56 } 56 }
57 57
58 if (defined(invoker.seed_corpuses)) { 58 if (defined(invoker.seed_corpuses)) {
59 foreach(seed_corpus_path, invoker.seed_corpuses) { 59 foreach(seed_corpus_path, invoker.seed_corpuses) {
60 args += [ rebase_path(seed_corpus_path) ] 60 args += [ rebase_path(seed_corpus_path, root_build_dir) ]
61 } 61 }
62 } 62 }
63 63
64 outputs = [ 64 outputs = [
65 out, 65 out,
66 ] 66 ]
67 67
68 deps = [ 68 deps = [
69 "//testing/libfuzzer:seed_corpus", 69 "//testing/libfuzzer:seed_corpus",
70 ] 70 ]
(...skipping 15 matching lines...) Expand all
86 } 86 }
87 test_deps += [ ":" + target_name + "_dict_copy" ] 87 test_deps += [ ":" + target_name + "_dict_copy" ]
88 } 88 }
89 89
90 # Generate .options file. 90 # Generate .options file.
91 config_name = target_name + ".options" 91 config_name = target_name + ".options"
92 action(config_name) { 92 action(config_name) {
93 script = "//testing/libfuzzer/gen_fuzzer_config.py" 93 script = "//testing/libfuzzer/gen_fuzzer_config.py"
94 args = [ 94 args = [
95 "--config", 95 "--config",
96 rebase_path("$root_build_dir/" + config_name), 96 rebase_path("$root_build_dir/" + config_name, root_build_dir),
97 ] 97 ]
98 98
99 if (defined(invoker.dict)) { 99 if (defined(invoker.dict)) {
100 args += [ 100 args += [
101 "--dict", 101 "--dict",
102 rebase_path("$root_build_dir/" + invoker.target_name + ".dict"), 102 rebase_path("$root_build_dir/" + invoker.target_name + ".dict",
103 root_build_dir),
103 ] 104 ]
104 } 105 }
105 106
106 if (defined(invoker.libfuzzer_options)) { 107 if (defined(invoker.libfuzzer_options)) {
107 args += [ "--libfuzzer_options" ] 108 args += [ "--libfuzzer_options" ]
108 args += invoker.libfuzzer_options 109 args += invoker.libfuzzer_options
109 } 110 }
110 111
111 outputs = [ 112 outputs = [
112 "$root_build_dir/$config_name", 113 "$root_build_dir/$config_name",
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 assert(invoker.seed_corpuses == [] || invoker.seed_corpuses != []) 160 assert(invoker.seed_corpuses == [] || invoker.seed_corpuses != [])
160 } 161 }
161 assert(!defined(invoker.check_includes) || invoker.check_includes != []) 162 assert(!defined(invoker.check_includes) || invoker.check_includes != [])
162 assert(!defined(invoker.include_dirs) || invoker.include_dirs != []) 163 assert(!defined(invoker.include_dirs) || invoker.include_dirs != [])
163 assert(!defined(invoker.defines) || invoker.defines != []) 164 assert(!defined(invoker.defines) || invoker.defines != [])
164 165
165 group(target_name) { 166 group(target_name) {
166 } 167 }
167 } 168 }
168 } 169 }
OLDNEW
« no previous file with comments | « services/catalog/public/tools/catalog.gni ('k') | tools/generate_library_loader/generate_library_loader.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698