• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash -eux
2
3# Copyright 2017 The Chromium OS Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6#
7# Builds fuzzers from within a container into ${OUT} directory.
8# Expects "${SRC}/adhd" to contain an adhd checkout.
9
10cd "${SRC}/adhd/cras"
11./git_prepare.sh
12
13FUZZER_LDFLAGS="${FUZZER_LDFLAGS} ${LIB_FUZZING_ENGINE}"
14./configure --enable-fuzzer
15
16# Compile fuzzers
17make -j$(nproc)
18
19# Copy fuzzers and dependencies to "${OUT}" directory
20cp "${SRC}/adhd/cras/src/cras_rclient_message_fuzzer" "${OUT}/rclient_message"
21zip -j "${OUT}/rclient_message_corpus.zip" ./src/fuzz/corpus/*
22
23cp "${SRC}/adhd/cras/src/cras_hfp_slc_fuzzer" "${OUT}/cras_hfp_slc"
24cp "${SRC}/adhd/cras/src/fuzz/cras_hfp_slc.dict" "${OUT}/cras_hfp_slc.dict"
25