CI Tests: Set DEBUGINFOD_URLS based on test FMF context.
Tests are supposed to be executed within defined context, such as e.g. tmt --root . -c arch=x86_64 -c distro=fedora-38 -c trigger=build run ... FTR: https://tmt.readthedocs.io/en/stable/spec/plans.html#context This update sets DEBUGINFOD_URLS based on the provided distro via the ci.fmf file.
This commit is contained in:
parent
3759fe484f
commit
91acc811a1
14
plans/ci.fmf
14
plans/ci.fmf
@ -3,13 +3,19 @@ adjust:
|
|||||||
- when: distro == fedora
|
- when: distro == fedora
|
||||||
discover+:
|
discover+:
|
||||||
filter: 'tier: 1'
|
filter: 'tier: 1'
|
||||||
|
environment+:
|
||||||
|
DEBUGINFOD_URLS: https://debuginfod.fedoraproject.org/
|
||||||
|
DEBUGINFOD_TIMEOUT: 300
|
||||||
|
- when: distro == rhel
|
||||||
|
environment+:
|
||||||
|
DEBUGINFOD_URLS: https://debuginfod.usersys.redhat.com/
|
||||||
|
DEBUGINFOD_TIMEOUT: 300
|
||||||
discover:
|
discover:
|
||||||
how: fmf
|
how: fmf
|
||||||
directory: tests
|
directory: tests
|
||||||
prepare:
|
prepare:
|
||||||
how: install
|
- name: prepare
|
||||||
exclude:
|
how: shell
|
||||||
- glibc-headers-x86
|
script: ./plans/prepare.sh
|
||||||
- glibc-headers-s390
|
|
||||||
execute:
|
execute:
|
||||||
how: tmt
|
how: tmt
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
summary: Setup task
|
|
||||||
prepare:
|
|
||||||
script: ./plans/ci/prepare/prepare.sh
|
|
||||||
recommend:
|
|
||||||
- koji
|
|
||||||
- bind-utils
|
|
||||||
- avahi-tools
|
|
@ -1,12 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
export DEBUGINFOD_URLS="https://debuginfod.fedoraproject.org/ $DEBUGINFOD_URLS"
|
|
||||||
export DEBUGINFOD_TIMEOUT=300
|
|
||||||
|
|
||||||
# On Rawhide, the running kernel packages won't probably be avail in
|
# On Rawhide, the running kernel packages won't probably be avail in
|
||||||
# configured repos. Debuginfo isn't a problem, we access that using
|
# configured repos. Debuginfo isn't a problem, we access that using
|
||||||
# the debuginfod.
|
# the debuginfod.
|
||||||
__install_deps ()
|
__fedora_install_deps ()
|
||||||
{
|
{
|
||||||
TMPD=$(mktemp -d)
|
TMPD=$(mktemp -d)
|
||||||
pushd $TMPD
|
pushd $TMPD
|
||||||
@ -20,8 +17,12 @@ __install_deps ()
|
|||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
|
source /etc/os-release
|
||||||
|
|
||||||
# Install needed packages
|
# Install needed packages
|
||||||
stap-prep || __install_deps
|
if [ "$ID" == "fedora" ]; then
|
||||||
|
stap-prep || __fedora_install_deps
|
||||||
|
fi
|
||||||
stap-prep
|
stap-prep
|
||||||
|
|
||||||
# Report installed packages
|
# Report installed packages
|
@ -50,8 +50,10 @@ rlJournalStart
|
|||||||
rlRun "pushd $TmpDir"
|
rlRun "pushd $TmpDir"
|
||||||
|
|
||||||
# Install needed debuginfo, best effort
|
# Install needed debuginfo, best effort
|
||||||
|
rlLogInfo "DEBUGINFOD_URLS=$DEBUGINFOD_URLS"
|
||||||
|
rlLogInfo "DEBUGINFOD_TIMEOUT=$DEBUGINFOD_TIMEOUT"
|
||||||
rlRun "L=$(stap -p2 -e 'probe python.function.entry {exit()}' | awk -F\" '/process/ {print $2}')" 0-255
|
rlRun "L=$(stap -p2 -e 'probe python.function.entry {exit()}' | awk -F\" '/process/ {print $2}')" 0-255
|
||||||
rlRun "debuginfo-install -y $L" 0-255
|
rlRun "debuginfo-install -y $L /usr/bin/python\*" 0-255
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "Verifying ELF file for presence of .probes section"
|
rlPhaseStartTest "Verifying ELF file for presence of .probes section"
|
||||||
|
@ -31,11 +31,6 @@
|
|||||||
|
|
||||||
PACKAGE="systemtap"
|
PACKAGE="systemtap"
|
||||||
|
|
||||||
if echo $ID | grep -Fq fedora; then
|
|
||||||
export DEBUGINFOD_URLS="https://debuginfod.fedoraproject.org/ $DEBUGINFOD_URLS"
|
|
||||||
export DEBUGINFOD_TIMEOUT=300
|
|
||||||
fi
|
|
||||||
|
|
||||||
_arch=$(arch)
|
_arch=$(arch)
|
||||||
|
|
||||||
function perf_probe_failed ()
|
function perf_probe_failed ()
|
||||||
@ -70,6 +65,8 @@ rlJournalStart
|
|||||||
rlRun "rpm -qa | egrep '^(kernel|systemtap|perf)' | sort"
|
rlRun "rpm -qa | egrep '^(kernel|systemtap|perf)' | sort"
|
||||||
rlRun "uname -r"
|
rlRun "uname -r"
|
||||||
rlRun "perf --version"
|
rlRun "perf --version"
|
||||||
|
rlLogInfo "DEBUGINFOD_URLS=$DEBUGINFOD_URLS"
|
||||||
|
rlLogInfo "DEBUGINFOD_TIMEOUT=$DEBUGINFOD_TIMEOUT"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
# bz1162939 ---------------------------------------------------
|
# bz1162939 ---------------------------------------------------
|
||||||
|
@ -29,11 +29,11 @@
|
|||||||
# Include Beaker environment
|
# Include Beaker environment
|
||||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
export DEBUGINFOD_URLS="https://debuginfod.fedoraproject.org/ $DEBUGINFOD_URLS"
|
|
||||||
export DEBUGINFOD_TIMEOUT=300
|
|
||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
rlPhaseStartSetup
|
rlPhaseStartSetup
|
||||||
|
rlLogInfo "DEBUGINFOD_URLS=$DEBUGINFOD_URLS"
|
||||||
|
rlLogInfo "DEBUGINFOD_TIMEOUT=$DEBUGINFOD_TIMEOUT"
|
||||||
|
|
||||||
# At this point we simply rely on that the %triggerin scriptlet from
|
# At this point we simply rely on that the %triggerin scriptlet from
|
||||||
# systemtap-runtime-java did it's job well. There was a hack to force
|
# systemtap-runtime-java did it's job well. There was a hack to force
|
||||||
# trigger it here, but commit respective to this comment removes it.
|
# trigger it here, but commit respective to this comment removes it.
|
||||||
|
@ -4,13 +4,10 @@
|
|||||||
|
|
||||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
export DEBUGINFOD_URLS="https://debuginfod.fedoraproject.org/ $DEBUGINFOD_URLS"
|
|
||||||
export DEBUGINFOD_TIMEOUT=300
|
|
||||||
# export DEBUGINFOD_PROGRESS=1
|
|
||||||
|
|
||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
rlPhaseStartTest
|
rlPhaseStartTest
|
||||||
|
rlLogInfo "DEBUGINFOD_URLS=$DEBUGINFOD_URLS"
|
||||||
|
rlLogInfo "DEBUGINFOD_TIMEOUT=$DEBUGINFOD_TIMEOUT"
|
||||||
rlRun "rpm -qa | egrep '^(kernel|systemtap)' | sort"
|
rlRun "rpm -qa | egrep '^(kernel|systemtap)' | sort"
|
||||||
rlRun "uname -r"
|
rlRun "uname -r"
|
||||||
rlRun "stap-prep"
|
rlRun "stap-prep"
|
||||||
|
@ -33,9 +33,6 @@ CMD='stap'
|
|||||||
BIN=$(which --skip-alias $CMD)
|
BIN=$(which --skip-alias $CMD)
|
||||||
PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN | head -1)}"
|
PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN | head -1)}"
|
||||||
|
|
||||||
export DEBUGINFOD_URLS="https://debuginfod.fedoraproject.org/ $DEBUGINFOD_URLS"
|
|
||||||
export DEBUGINFOD_TIMEOUT=300
|
|
||||||
|
|
||||||
function service_stap_server() {
|
function service_stap_server() {
|
||||||
action=$1
|
action=$1
|
||||||
retval=${2:-0}
|
retval=${2:-0}
|
||||||
@ -57,6 +54,8 @@ _rhelmajor=$(rpm --eval '%{rhel}')
|
|||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
rlPhaseStartSetup
|
rlPhaseStartSetup
|
||||||
|
rlLogInfo "DEBUGINFOD_URLS=$DEBUGINFOD_URLS"
|
||||||
|
rlLogInfo "DEBUGINFOD_TIMEOUT=$DEBUGINFOD_TIMEOUT"
|
||||||
rlRun "TMPDIR=$(mktemp -d)"
|
rlRun "TMPDIR=$(mktemp -d)"
|
||||||
rlRun "pushd $TMPDIR"
|
rlRun "pushd $TMPDIR"
|
||||||
rlAssertRpm dbus
|
rlAssertRpm dbus
|
||||||
|
@ -29,9 +29,6 @@
|
|||||||
# Include Beaker environment
|
# Include Beaker environment
|
||||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
export DEBUGINFOD_URLS="https://debuginfod.fedoraproject.org/ $DEBUGINFOD_URLS"
|
|
||||||
export DEBUGINFOD_TIMEOUT=300
|
|
||||||
|
|
||||||
PACKAGE="$(rpm -qf $( which stap ) | head -n 1 )"
|
PACKAGE="$(rpm -qf $( which stap ) | head -n 1 )"
|
||||||
WORKDIR=$( mktemp -d )
|
WORKDIR=$( mktemp -d )
|
||||||
TESTUSER=mytestuser
|
TESTUSER=mytestuser
|
||||||
@ -40,6 +37,8 @@ TESTUSER=mytestuser
|
|||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
rlPhaseStart WARN "Check the environment"
|
rlPhaseStart WARN "Check the environment"
|
||||||
|
rlLogInfo "DEBUGINFOD_URLS=$DEBUGINFOD_URLS"
|
||||||
|
rlLogInfo "DEBUGINFOD_TIMEOUT=$DEBUGINFOD_TIMEOUT"
|
||||||
if ! stap -V 2>&1 | grep -q 'enabled features:.*DYNINST'; then
|
if ! stap -V 2>&1 | grep -q 'enabled features:.*DYNINST'; then
|
||||||
rlLogWarning "No dyninst available in $PACKAGE"
|
rlLogWarning "No dyninst available in $PACKAGE"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
Loading…
Reference in New Issue
Block a user