| 1 | #!/bin/bash |
| 2 | # |
| 3 | # SPDX-FileCopyrightText: 2021 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com> |
| 4 | # |
| 5 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 6 | |
| 7 | # Collect the tap logs in a post build step when the build was terminated due |
| 8 | # to timeout. |
| 9 | |
| 10 | set -exu |
| 11 | |
| 12 | # Required variables |
| 13 | WORKSPACE=${WORKSPACE:-} |
| 14 | |
| 15 | SRCDIR="$WORKSPACE/src/lttng-tools" |
| 16 | TAPDIR="$WORKSPACE/tap" |
| 17 | LOGDIR="$WORKSPACE/log" |
| 18 | |
| 19 | cd "$SRCDIR" |
| 20 | |
| 21 | # Collect all available tap logs |
| 22 | rsync -a --exclude 'test-suite.log' --include '*/' --include '*.log' --exclude='*' tests/ "$TAPDIR" || true |
| 23 | |
| 24 | # Collect the test suites top-level log which includes all tests failures |
| 25 | rsync -a --include 'test-suite.log' --include '*/' --exclude='*' tests/ "$LOGDIR" || true |
| 26 | |
| 27 | # EOF |