From a9868fda7cd7166ed4cc66c17c0535ca6ea0daf1 Mon Sep 17 00:00:00 2001 From: Mateusz Moscicki Date: Fri, 19 Feb 2021 11:41:07 +0100 Subject: [PATCH] system-tests: Fix behavior when dump directory is missing Since crash-manager is responsible for creating dump directory (commit 96a11f21e013e1de3d02ee438c4291d55de56e9e), the absence of this directory cannot be considered as an error. Change-Id: I8db05869c951b3d9b893a223d020dc146ba9455f --- tests/system/utils/minicore-utils.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/system/utils/minicore-utils.sh b/tests/system/utils/minicore-utils.sh index 2805d54..c9740f0 100644 --- a/tests/system/utils/minicore-utils.sh +++ b/tests/system/utils/minicore-utils.sh @@ -81,11 +81,9 @@ function clean_crash_dump { sleep 1 - if [ ! -d ${CRASH_DUMP_PATH} ]; then - fail "${CRASH_DUMP_PATH} does not exist" + if [ -d ${CRASH_DUMP_PATH} ]; then + rm -rf ${CRASH_DUMP_PATH}/* fi - - rm -rf ${CRASH_DUMP_PATH}/* } function clean_logdump { -- 2.7.4