3 # Copyright 2020 The Pigweed Authors
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 # use this file except in compliance with the License. You may obtain a copy of
9 # https://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 # License for the specific language governing permissions and limitations under
17 # TODO(pwbug/177): Pythonize this, or otherwise replace it.
25 while [ -n "$1" ] ; do
30 read -p "Do you wish to continue? [yN]" confirm
38 confirm "This script builds and runs a example fuzzer." \
39 "This script is about to delete $OUT_DIR."
44 echo 'pw_target_toolchain="//pw_toolchain:host_clang_og"' > $OUT_DIR/args.gn
45 echo 'pw_sanitizer="address"' >> $OUT_DIR/args.gn
47 ninja -C $OUT_DIR pw_module_fuzzers
50 confirm "The toy_fuzzer was built successfully!" \
51 "This script is about to start fuzzing."
53 $OUT_DIR/obj/pw_fuzzer/toy_fuzzer