+function archive_parse_test_results () {
+
+ set -exuo pipefail
+
+ # Arguments:
+ # - ${1}: Directory to archive to. Required. Parent has to exist.
+ # Variables read:
+ # - ARCHIVE_DIR - Path to where robot result files are created in.
+ # - VPP_DIR - Path to existing directory, root for to relative paths.
+ # Directories updated:
+ # - ${1} - Created, and robot and parsing files are moved/created there.
+ # Functions called:
+ # - die - Print to stderr and exit, defined in common.sh
+ # - parse_bmrr_results - See definition in this file.
+
+ cd "${VPP_DIR}" || die "Change directory command failed."
+ target="$(readlink -f "$1")"
+ mkdir -p "${target}" || die "Directory creation failed."
+ for filename in "output.xml" "log.html" "report.html"; do
+ mv "${ARCHIVE_DIR}/${filename}" "${target}/${filename}" || {
+ die "Attempt to move '${filename}' failed."
+ }
+ done
+ parse_bmrr_results "${target}" || {
+ die "The function should have died on error."
+ }
+}
+
+