From 0858af52bb88b5816525f189635898c53d6cc503 Mon Sep 17 00:00:00 2001 From: Konstantin Belov Date: Tue, 6 Feb 2024 12:17:59 +0100 Subject: [PATCH] automated: linux: mmtests: removed tmp file usage There is not need in tmp file anymore. Signed-off-by: Konstantin Belov --- automated/linux/mmtests/mmtests.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/automated/linux/mmtests/mmtests.sh b/automated/linux/mmtests/mmtests.sh index fdd43e3a6..a8fd1bab3 100755 --- a/automated/linux/mmtests/mmtests.sh +++ b/automated/linux/mmtests/mmtests.sh @@ -294,17 +294,14 @@ collect_results() { if check_results "$json"; then ((CHECK_RESULTS++)) fi - # Create a temp file to hold the merged JSON - merge_file=$(mktemp) # Merge sysinfo, details and results JSON jq -n \ --slurpfile s "${TEST_DIR}"/${SYSINFO_FILE} \ --slurpfile c "${TEST_DIR}"/${CONFIG_DUMP} \ --slurpfile d "$details_file" \ --slurpfile r "$json" \ - '{sys_info: $s[0], details: $d[0], results: $r[0]}' > "$merge_file" - # Replace results file - mv "$merge_file" "${OUTPUT}"/"$json" + '{sys_info: $s[0], details: $d[0], results: $r[0]}' > "${OUTPUT}"/"$json" + if [ "${FULL_ARCHIVE}" = "true" ]; then mv "${TEST_DIR}/work/log/${RESULTS_DIR}" "${OUTPUT}" fi