| |
@@ -116,15 +116,22 @@
|
| |
fi
|
| |
local run_journal="$STR_ARTIFACTS_DIR/test.log"
|
| |
echo "${status} $STR_TEST_NAME" >> "$run_journal"
|
| |
- # Handle results.yml file
|
| |
+ # Handle results.yml file, rename logs
|
| |
local results="$STR_ARTIFACTS_DIR/results.yml"
|
| |
local result=$(echo $status | tr '[:upper:]' '[:lower:]')
|
| |
test -f "$results" || echo 'results:' > "$results"
|
| |
- echo "- {result: $result, test: $STR_TEST_NAME}" >> "$results"
|
| |
- if [ -e "$logfile_stdout" ]; then
|
| |
- local new_logfile_stdout="$(dirname "$logfile_stdout")/${status}_$(basename "$logfile_stdout")"
|
| |
- mv -f "$logfile_stdout" "$new_logfile_stdout"
|
| |
- fi
|
| |
+ printf '%s\n' '' \
|
| |
+ "- test: $STR_TEST_NAME" \
|
| |
+ " result: $result" \
|
| |
+ " logs:" \
|
| |
+ >> "$results"
|
| |
+ for log in "$logfile_stdout" "$logfile_stderr"; do
|
| |
+ if [ -f "$log" ]; then
|
| |
+ local prefixed_log="$STR_ARTIFACTS_DIR/${status}-$(basename $log)"
|
| |
+ mv -f "$log" "$prefixed_log"
|
| |
+ echo " - $(basename $prefixed_log)" >> "$results"
|
| |
+ fi
|
| |
+ done
|
| |
exit 0
|
| |
}
|
| |
trap clean_exit SIGINT SIGTERM SIGABRT EXIT
|
| |
Include all log file names in the results.yml file.
Prefix all log files so that investigation is easier.