system tests: log_dump: fix multiple issues 59/200559/2
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Tue, 26 Feb 2019 15:19:03 +0000 (16:19 +0100)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Wed, 27 Feb 2019 11:24:24 +0000 (12:24 +0100)
Fixes:
 - invalid crash report existence tests
 - lack of bash dependency in one test
 - non-unique test file used

Change-Id: Iee9c7c9592054008c5e3bfd23e90e0c09f6e849b

tests/system/log_dump_normal/log_dump_normal.sh.template
tests/system/log_dump_short/log_dump_short.sh.template

index ef22b69..419b648 100644 (file)
@@ -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
index e4db298..b40555e 100644 (file)
@@ -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