summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarol Lewandowski <k.lewandowsk@samsung.com>2019-02-26 16:19:03 +0100
committerKarol Lewandowski <k.lewandowsk@samsung.com>2019-02-27 12:24:24 +0100
commit6a8e29fbd8bf804a95554b1a29114dde4d9e58fb (patch)
tree1f6eb101db0357fadb84cfc811d27dc394cd47fa
parent9c59b04f964df92c86587b67fc45945ae41efaa2 (diff)
downloadcrash-worker-6a8e29fbd8bf804a95554b1a29114dde4d9e58fb.tar.gz
crash-worker-6a8e29fbd8bf804a95554b1a29114dde4d9e58fb.tar.bz2
crash-worker-6a8e29fbd8bf804a95554b1a29114dde4d9e58fb.zip
system tests: log_dump: fix multiple issues
Fixes: - invalid crash report existence tests - lack of bash dependency in one test - non-unique test file used Change-Id: Iee9c7c9592054008c5e3bfd23e90e0c09f6e849b
-rw-r--r--tests/system/log_dump_normal/log_dump_normal.sh.template3
-rw-r--r--tests/system/log_dump_short/log_dump_short.sh.template7
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/system/log_dump_normal/log_dump_normal.sh.template b/tests/system/log_dump_normal/log_dump_normal.sh.template
index ef22b69..419b648 100644
--- a/tests/system/log_dump_normal/log_dump_normal.sh.template
+++ b/tests/system/log_dump_normal/log_dump_normal.sh.template
@@ -9,8 +9,7 @@ fi
. ${CRASH_WORKER_SYSTEM_TESTS}/utils/minicore-utils.sh
clean_logdump
-dummy="$CRASH_DUMP_DIR/logdump-short-test"
-touch "$dummy"
+dummy=$(mktemp $CRASH_DUMP_PATH/logdump-normal-test.XXXXXX)
log_dump --normal
logfile="${LOGDUMP_RESULT_PATH}"/* # there shall be only one file
diff --git a/tests/system/log_dump_short/log_dump_short.sh.template b/tests/system/log_dump_short/log_dump_short.sh.template
index e4db298..b40555e 100644
--- a/tests/system/log_dump_short/log_dump_short.sh.template
+++ b/tests/system/log_dump_short/log_dump_short.sh.template
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Custom report path test
@@ -10,8 +10,7 @@ fi
clean_logdump
-dummy="$CRASH_DUMP_DIR/logdump-short-test"
-touch "$dummy"
+dummy=$(mktemp $CRASH_DUMP_PATH/logdump-short-test.XXXXXX)
log_dump --short
logfile="${LOGDUMP_RESULT_PATH}"/* # there shall be only one file
@@ -26,7 +25,7 @@ fi
check_zip_contains "$logfile" 'log/dump_systemstate.*log$'
check_zip_contains "$logfile" 'log/$'
-check_file_not_exists "$dummy"
+check_file_exists "$dummy"
clean_logdump