[build] Enable cmdline fuzzer test.
This CL updates the cmdline fuzzer definition to work with the unified
build, and adds its back to the build graph.
Bug: 60410
Change-Id: I7c6e4f069ee92c3c474c2bbec33a85dbf6ef4697
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/474229
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Fuchsia-Auto-Submit: David Turner <digit@google.com>
Reviewed-by: P.Y. Laligand <pylaligand@google.com>
diff --git a/zircon/system/ulib/BUILD.gn b/zircon/system/ulib/BUILD.gn
index f9b57b2..9298c2d 100644
--- a/zircon/system/ulib/BUILD.gn
+++ b/zircon/system/ulib/BUILD.gn
@@ -27,6 +27,7 @@
"c:tests",
"chromeos-disk-setup:tests",
"closure-queue:tests",
+ "cmdline:tests",
"cobalt-client:tests",
"debugdata:tests",
"digest:tests",
diff --git a/zircon/system/ulib/cmdline/BUILD.gn b/zircon/system/ulib/cmdline/BUILD.gn
index 35597f6..37b5f17 100644
--- a/zircon/system/ulib/cmdline/BUILD.gn
+++ b/zircon/system/ulib/cmdline/BUILD.gn
@@ -19,3 +19,8 @@
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config/zircon:Wno-conversion" ]
}
+
+group("tests") {
+ testonly = true
+ deps = [ "test" ]
+}
diff --git a/zircon/system/ulib/cmdline/test/BUILD.gn b/zircon/system/ulib/cmdline/test/BUILD.gn
index cf2c4a56..7d858a1 100644
--- a/zircon/system/ulib/cmdline/test/BUILD.gn
+++ b/zircon/system/ulib/cmdline/test/BUILD.gn
@@ -2,14 +2,19 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("//zircon/public/gn/fuzzer.gni")
+import("//build/cpp/cpp_fuzzer.gni")
group("test") {
testonly = true
- deps = [ ":cmdline-fuzzer" ]
+ deps = [ ":cmdline-fuzzers($default_toolchain)" ]
}
-zx_fuzzer("cmdline-fuzzer") {
+fuzzer_package("cmdline-fuzzers") {
+ fuzz_host = true
+ cpp_fuzzers = [ ":cmdline-fuzzer" ]
+}
+
+cpp_fuzzer("cmdline-fuzzer") {
sources = [ "cmdline_fuzzer.cc" ]
deps = [ "//zircon/system/ulib/cmdline" ]
}