Improve checking for systemtap files

Log whether _STAP_FILE (the systemtap example) is used from any rpm.
Make sure the tapset (probes files) is used from PACKAGES
This commit is contained in:
Lukáš Zachar 2024-08-05 11:50:47 +02:00
commit bbbeff3374

View file

@ -44,6 +44,7 @@ rlJournalStart
rlAssertRpm --all
rlAssertBinaryOrigin $RUBY
rlAssertExists "${_STAP_FILE}" || rlDie
rlLog "Using STAP_FILE from $(rpm -qf ${_STAP_FILE})."
rlRun "stap-prep" 0 "Prepare system for systemtap use"
rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
rlRun "pushd ${TmpDir}"
@ -53,8 +54,7 @@ rlJournalStart
rlPhaseStartTest
# TODO: Systemtap - The test could be enlarged by other methods / functions / objects / ...
rlRun "rpm -ql $PACKAGES | grep 'stp' | grep 'tapset'" 0 "Checking tapset file"
rlRun "rpm -ql $PACKAGES | grep 'stp' | grep 'doc'" 0 "Checking doc file"
rlRun "rpm -ql $PACKAGES | grep 'stp' | grep 'tapset'" 0 "Checking file with ruby systemtap probes"
if ! $RUBY $RUBY_OPTS -e ''; then
rlLog "Can't use $RUBY_OPTS as option for $RUBY, removing these options"