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