Harish Mahendrakar | 5f3bd1e | 2019-08-26 12:59:38 -0700 | [diff] [blame] | 1 | #!/bin/bash -eu |
| 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 | # Ensure SRC and WORK are set |
| 17 | test "${SRC}" != "" || exit 1 |
| 18 | test "${WORK}" != "" || exit 1 |
| 19 | test "${OUT}" != "" || exit 1 |
| 20 | |
| 21 | # Build libavc |
| 22 | build_dir=$WORK/build |
| 23 | rm -rf ${build_dir} |
| 24 | mkdir -p ${build_dir} |
Ashwin Natesan | ca68f61 | 2022-01-04 13:44:43 +0530 | [diff] [blame] | 25 | |
Harish Mahendrakar | 5f3bd1e | 2019-08-26 12:59:38 -0700 | [diff] [blame] | 26 | pushd ${build_dir} |
Ashwin Natesan | ca68f61 | 2022-01-04 13:44:43 +0530 | [diff] [blame] | 27 | cmake ${SRC}/libavc |
| 28 | make -j$(nproc) avc_dec_fuzzer |
| 29 | cp ${build_dir}/avc_dec_fuzzer $OUT/avc_dec_fuzzer |
Harish Mahendrakar | 5f3bd1e | 2019-08-26 12:59:38 -0700 | [diff] [blame] | 30 | popd |
| 31 | |
Harish Mahendrakar | 5f3bd1e | 2019-08-26 12:59:38 -0700 | [diff] [blame] | 32 | cp $SRC/avc_dec_fuzzer_seed_corpus.zip $OUT/avc_dec_fuzzer_seed_corpus.zip |
| 33 | cp $SRC/libavc/fuzzer/avc_dec_fuzzer.dict $OUT/avcdec_fuzzer.dict |