pw_presubmit: gn check system and generated files
- In presubmit, do gn check in a separate step and specify
--check-generated and --check-system.
- Fix gn check issues in pw_fuzzer by adding a missing dependency.
- Disable include checking for generated pw_rpc headers since they
include internal pw_rpc headers.
Change-Id: I8b9f03957ac60166eeb141bcba9dc493bfc6350c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/44562
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
diff --git a/pw_fuzzer/BUILD.gn b/pw_fuzzer/BUILD.gn
index e97d084..1359db4 100644
--- a/pw_fuzzer/BUILD.gn
+++ b/pw_fuzzer/BUILD.gn
@@ -19,8 +19,9 @@
import("$dir_pw_fuzzer/fuzzer.gni")
import("$dir_pw_fuzzer/oss_fuzz.gni")
-config("default_config") {
+config("public_include_path") {
include_dirs = [ "public" ]
+ visibility = [ ":*" ]
}
# This is added automatically by the `pw_fuzzer` template.
@@ -45,7 +46,7 @@
}
pw_source_set("pw_fuzzer") {
- public_configs = [ ":default_config" ]
+ public_configs = [ ":public_include_path" ]
public = [
"public/pw_fuzzer/asan_interface.h",
"public/pw_fuzzer/fuzzed_data_provider.h",
@@ -54,7 +55,7 @@
}
pw_source_set("run_as_unit_test") {
- configs = [ ":default_config" ]
+ configs = [ ":public_include_path" ]
sources = [ "pw_fuzzer_disabled.cc" ]
deps = [
dir_pw_log,