diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 13:54:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 13:54:25 +0000 |
commit | 9cb1c4df7b9ce1a9ad1312621b0f2b16a94fba3a (patch) | |
tree | 2efb72864cc69e174c9c5ee33efb88a5f1553b48 /tools/test-github.sh | |
parent | Initial commit. (diff) | |
download | dracut-9cb1c4df7b9ce1a9ad1312621b0f2b16a94fba3a.tar.xz dracut-9cb1c4df7b9ce1a9ad1312621b0f2b16a94fba3a.zip |
Adding upstream version 060+5.upstream/060+5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/test-github.sh')
-rwxr-xr-x | tools/test-github.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tools/test-github.sh b/tools/test-github.sh new file mode 100755 index 0000000..4fed092 --- /dev/null +++ b/tools/test-github.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +set -ex + +[[ -d ${0%/*} ]] && cd "${0%/*}"/../ + +RUN_ID="$1" +TESTS=$2 + +./configure + +NCPU=$(getconf _NPROCESSORS_ONLN) + +if ! [[ $TESTS ]]; then + # GitHub workflows fetch a clone of the dracut repository which doesn't + # contain git tags, thus "breaking" the RPM build in certain situations + # i.e.: + # DRACUT_MAIN_VERSION in Makefile is defined as an output of `git describe`, + # which in full git clone returns a tag with a numeric version. However, + # without tags it returns SHA of the last commit, which later propagates into + # `Provides:` attribute of the built RPM and can break dependency tree when + # installed + [[ -d .git ]] && git fetch --tags && git describe --tags + make -j "$NCPU" all syncheck rpm logtee +else + make -j "$NCPU" enable_documentation=no all logtee + + cd test + + # shellcheck disable=SC2012 + time LOGTEE_TIMEOUT_MS=590000 make \ + enable_documentation=no \ + KVERSION="$( + cd /lib/modules + ls -1 | tail -1 + )" \ + QEMU_CPU="IvyBridge-v2" \ + DRACUT_NO_XATTR=1 \ + TEST_RUN_ID="$RUN_ID" \ + ${TESTS:+TESTS="$TESTS"} \ + -k V=1 \ + check +fi |