1# Copyright 2019 Evan Miller 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15################################################################################ 16 17#!/bin/bash -eu 18 19./autogen.sh 20./configure --enable-static 21make clean 22 23make 24make generate_corpus 25./generate_corpus 26 27zip $OUT/fuzz_format_dta_seed_corpus.zip ./fuzz/corpus/dta*/test-case-* 28zip $OUT/fuzz_format_por_seed_corpus.zip ./fuzz/corpus/por/test-case-* 29zip $OUT/fuzz_format_sav_seed_corpus.zip ./fuzz/corpus/sav*/test-case-* ./fuzz/corpus/zsav/test-case-* 30zip $OUT/fuzz_format_sas7bcat_seed_corpus.zip ./fuzz/corpus/sas7bcat/test-case-* 31zip $OUT/fuzz_format_sas7bdat_seed_corpus.zip ./fuzz/corpus/sas7bdat*/test-case-* 32zip $OUT/fuzz_format_xport_seed_corpus.zip ./fuzz/corpus/xpt*/test-case-* 33 34cp ./fuzz/dict/fuzz_format_spss_commands.dict $OUT/fuzz_format_spss_commands.dict 35cp ./fuzz/dict/fuzz_format_stata_commands.dict $OUT/fuzz_format_stata_commands.dict 36cp ./fuzz/dict/fuzz_format_sas_commands.dict $OUT/fuzz_format_sas_commands.dict 37 38READSTAT_FUZZERS=" 39 fuzz_compression_sav \ 40 fuzz_grammar_spss_format \ 41 fuzz_format_sas_commands \ 42 fuzz_format_spss_commands \ 43 fuzz_format_stata_dictionary \ 44 fuzz_format_dta \ 45 fuzz_format_por \ 46 fuzz_format_sav \ 47 fuzz_format_sas7bcat \ 48 fuzz_format_sas7bdat \ 49 fuzz_format_xport" 50 51for fuzzer in $READSTAT_FUZZERS; do 52 make ${fuzzer} 53 cp ${fuzzer} $OUT/${fuzzer} 54done 55