• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash -eu
2# Copyright 2016 Google Inc.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16################################################################################
17
18# avoid iconv() memleak on Ubuntu 16.04 image (breaks test suite)
19export ASAN_OPTIONS=detect_leaks=0
20
21./bootstrap
22./configure --enable-static --disable-doc
23make -j
24make -j check
25
26cd fuzz
27make oss-fuzz
28find . -name '*_fuzzer.dict' -exec cp -v '{}' $OUT ';'
29find . -name '*_fuzzer.options' -exec cp -v '{}' $OUT ';'
30
31for fuzzer in *_fuzzer; do
32    cp -p "${fuzzer}" "$OUT"
33
34    if [ -f "$SRC/${fuzzer}_seed_corpus.zip" ]; then
35        cp "$SRC/${fuzzer}_seed_corpus.zip" "$OUT/"
36    fi
37
38    if [ -d "${fuzzer}.in/" ]; then
39        zip -rj "$OUT/${fuzzer}_seed_corpus.zip" "${fuzzer}.in/"
40    fi
41done
42