summaryrefslogtreecommitdiff
path: root/infra/commands
diff options
context:
space:
mode:
authorDmitriy Nikiforov <d.nikiforov@samsung.com>2017-10-31 19:44:46 +0300
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2017-11-07 12:33:58 +0000
commita151d7860c2b9c0440b60d73d3502f7ae588f68d (patch)
tree3f7f3dc112ad1b0ef11b9fced2abfe665549a0d2 /infra/commands
parent0a5f480bda5817a382da0027a843e85c46caea91 (diff)
downloadfuzz-testing-a151d7860c2b9c0440b60d73d3502f7ae588f68d.tar.gz
fuzz-testing-a151d7860c2b9c0440b60d73d3502f7ae588f68d.tar.bz2
fuzz-testing-a151d7860c2b9c0440b60d73d3502f7ae588f68d.zip
Clean all previously published targets in the 'publish' command
This should save us a lot of space on device. Change-Id: I42e47c223cb6c07c8c46ccbda844a167bc20a235
Diffstat (limited to 'infra/commands')
-rwxr-xr-xinfra/commands/publish.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/infra/commands/publish.sh b/infra/commands/publish.sh
index 2bdd2af..f179473 100755
--- a/infra/commands/publish.sh
+++ b/infra/commands/publish.sh
@@ -98,6 +98,10 @@ if [[ -z ${ARCH} || ! -d ${PROJECT_DIR}/${ARCH} ]]; then
exit 1
fi
+# clean previous artifacts
+printf "\nCleaning artifacts from previous builds..."
+sdb_shell rm -rf "${FUZZING_DIR}" '||' ':'
+
# check and install, if needed, necessary dependencies
printf "\nChecking dependencies...\n"
check_and_install_deps "${INSTALL_DEPS}" 'base' 'cpio'
@@ -164,7 +168,6 @@ done
printf "\nPushing dictionaries to device...\n"
dict_dir="${PROJECT_DEST_DIR}/dicts"
-sdb_shell rm -rf "${dict_dir}" '||' true
sdb_shell mkdir -p "${dict_dir}"
if [[ -d ${PROJECT_DIR}/dicts ]]; then
echo "sdb push ${PROJECT_DIR}/dicts ${dict_dir}"
@@ -190,7 +193,6 @@ for target in "${targets[@]}"; do
target_name=$(basename "${target}")
seed_corpus_zip=$(find "${CORPUS_DIR}" -name "${target_name}.zip" -print -quit 2>/dev/null || true)
if [[ -n ${CORPUS_DIR} && -f ${seed_corpus_zip} ]]; then
- sdb_shell rm -f "${seed_corpus_dir}/*" '||' true
echo "sdb push ${seed_corpus_zip} ${seed_corpus_dir}"
${SDB_CMD} push "${seed_corpus_zip}" "${seed_corpus_dir}" >/dev/null