blob: 44413a7f6d729012b0299a354e4182ed46c7f0e6 [file] [log] [blame]
#!/bin/bash -eux
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Builds fuzzers from within a container into ${OUT} directory.
# Expects "${SRC}/adhd" to contain an adhd checkout.
cd "${SRC}/adhd/cras"
./configure --enable-fuzzer
# Compile fuzzers
make -j$(nproc)
# Copy fuzzers and dependencies to "${OUT}" directory
cp "${SRC}/adhd/cras/src/cras_rclient_message_fuzzer" "${OUT}/rclient_message"
zip -j "${OUT}/" ./src/fuzz/corpus/*
cp "${SRC}/adhd/cras/src/cras_hfp_slc_fuzzer" "${OUT}/cras_hfp_slc"
cp "${SRC}/adhd/cras/src/fuzz/cras_hfp_slc.dict" "${OUT}/cras_hfp_slc.dict"