Skip to content

Commit

Permalink
automated: linux: mmtests: removed tmp file usage
Browse files Browse the repository at this point in the history
There is not need in tmp file anymore.

Signed-off-by: Konstantin Belov <[email protected]>
  • Loading branch information
Konstantin Belov committed Feb 12, 2024
1 parent 54a1192 commit 0858af5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions automated/linux/mmtests/mmtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0858af5

Please sign in to comment.