blob: e84a89a1803ab1e6cec1861cd90ce02fb7ce05b9 [file] [log] [blame]
Craig Tillerc6d6a022016-03-18 11:52:36 -07001%YAML 1.2
2---
3foreach: targets
4cond: selected.build == 'fuzzer'
5output_name: ${selected.name}.sh
6template: |
7 #!/bin/bash
8 # Copyright 2016, Google Inc.
9 # All rights reserved.
10 #
11 # Redistribution and use in source and binary forms, with or without
12 # modification, are permitted provided that the following conditions are
13 # met:
14 #
15 # * Redistributions of source code must retain the above copyright
16 # notice, this list of conditions and the following disclaimer.
17 # * Redistributions in binary form must reproduce the above
18 # copyright notice, this list of conditions and the following disclaimer
19 # in the documentation and/or other materials provided with the
20 # distribution.
21 # * Neither the name of Google Inc. nor the names of its
22 # contributors may be used to endorse or promote products derived from
23 # this software without specific prior written permission.
24 #
25 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 #
37
Craig Tiller3ecf26d2016-04-22 15:25:03 -070038 flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=${selected.maxlen} -timeout=120"
Craig Tiller8d1cb3c2016-04-11 20:59:51 -070039
Craig Tiller134a6b62016-04-18 08:14:20 -070040 %if selected.get('dict'):
41 flags="$flags -dict=${selected.dict}"
42 %endif
43
Craig Tiller8d1cb3c2016-04-11 20:59:51 -070044 if [ "$jobs" != "1" ]
45 then
Craig Tiller0d17ee32016-04-14 09:30:32 -070046 flags="-jobs=$jobs -workers=$jobs $flags"
Craig Tiller8d1cb3c2016-04-11 20:59:51 -070047 fi
48
Craig Tillerae945942016-03-23 21:43:58 -070049 if [ "$config" == "asan-trace-cmp" ]
50 then
51 flags="-use_traces=1 $flags"
52 fi
53
54 bins/$config/${selected.name} $flags fuzzer_output ${' '.join(selected.corpus_dirs)}