flatcar-scripts/ci-automation/test_update_reruns.sh
Thilo Fromm f07cb5f781 tapfile_helper ff.: support TAP and Markdown output
This change adds markdown output support to tapfile helper.
tap_generate_report() has been refactored to use low-level output
functions to write tests; TAP and markdown output is supported and both
are generated by default. Also, it should be straightforward to add
other output formats by implementing the respective low level print
functions.

The markdown output is now used by run-kola-tests.yaml to generate step
output and, if run from a PR, add a comment with test results to the PR.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-03-29 21:05:47 +02:00

31 lines
898 B
Bash
Executable File

#!/bin/bash
#
# Copyright (c) 2021 The Flatcar Maintainers.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Helper script for test.sh to update the test failures text file.
# test.sh uses this to determine which tests need to re-run.
# This script is run within the SDK container.
set -euo pipefail
arch="$1"
vernum="$2"
image="$3"
retry="$4"
tapfile="$5"
failfile="$6"
merged_summary="$7"
merged_detailed="$8"
source ci-automation/ci-config.env
source ci-automation/tapfile_helper_lib.sh
tap_ingest_tapfile "${tapfile}" "${image}" "${retry}"
tap_failed_tests_for_vendor "${image}" > "${failfile}"
for format in "${TEST_REPORT_FORMATS[@]}"; do
tap_generate_report "${arch}" "${vernum}" "${format}" > "${merged_summary}.${format}"
tap_generate_report "${arch}" "${vernum}" "${format}" "true" > "${merged_detailed}.${format}"
done