1%YAML 1.2
2---
3foreach: targets
4cond: selected.build == 'fuzzer'
5output_name: ${selected.name}.sh
6template: |
7  #!/bin/bash
8  # Copyright 2016 gRPC authors.
9  #
10  # Licensed under the Apache License, Version 2.0 (the "License");
11  # you may not use this file except in compliance with the License.
12  # You may obtain a copy of the License at
13  #
14  #     http://www.apache.org/licenses/LICENSE-2.0
15  #
16  # Unless required by applicable law or agreed to in writing, software
17  # distributed under the License is distributed on an "AS IS" BASIS,
18  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  # See the License for the specific language governing permissions and
20  # limitations under the License.
21  #
22
23  flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=${selected.maxlen} -timeout=120"
24
25  %if selected.get('dict'):
26  flags="$flags -dict=${selected.dict}"
27  %endif
28
29  if [ "$jobs" != "1" ]
30  then
31    flags="-jobs=$jobs -workers=$jobs $flags"
32  fi
33
34  if [ "$config" == "asan-trace-cmp" ]
35  then
36    flags="-use_traces=1 $flags"
37  fi
38
39  bins/$config/${selected.name} $flags fuzzer_output ${' '.join(selected.corpus_dirs)}
40