]> git.ipfire.org Git - thirdparty/dracut.git/blob - fedora-test-github.sh
dmsquash-live-root: Remove obsolete osmin.img processing.
[thirdparty/dracut.git] / fedora-test-github.sh
1 #!/bin/bash
2
3 set -ex
4
5 [[ -d ${0%/*} ]] && cd ${0%/*}
6
7 RUN_ID="$1"
8 TESTS=$2
9
10 ./configure
11
12 NCPU=$(getconf _NPROCESSORS_ONLN)
13
14 if ! [[ $TESTS ]]; then
15 # GitHub workflows fetch a clone of the dracut repository which doesn't
16 # contain git tags, thus "breaking" the RPM build in certain situations
17 # i.e.:
18 # DRACUT_MAIN_VERSION in Makefile is defined as an output of `git describe`,
19 # which in full git clone returns a tag with a numeric version. However,
20 # without tags it returns SHA of the last commit, which later propagates into
21 # `Provides:` attribute of the built RPM and can break dependency tree when
22 # installed
23 [[ -d .git ]] && git fetch --tags && git describe --tags
24 make -j$NCPU all syncheck rpm logtee
25 else
26 if [[ $TESTS == "99" ]]; then
27 [[ -d .git ]] && git fetch --tags && git describe --tags
28 make_docs=yes
29 else
30 make_docs=no
31 fi
32
33 make -j$NCPU enable_documentation=$make_docs all logtee
34
35 cd test
36
37 time LOGTEE_TIMEOUT_MS=590000 make \
38 enable_documentation=$make_docs \
39 KVERSION=$(rpm -qa kernel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -rn | head -1) \
40 DRACUT_NO_XATTR=1 \
41 TEST_RUN_ID=$RUN_ID \
42 ${TESTS:+TESTS="$TESTS"} \
43 -k V=1 \
44 check
45 fi