Add check for unwanted files

For now check is for:
- .pem
- .exe
This commit is contained in:
Lukáš Zachar 2024-08-12 14:43:33 +02:00
commit f0eab92a21
2 changed files with 24 additions and 0 deletions

View file

@ -74,6 +74,7 @@
dir: pyproject-rpm-macros/tests
run: ./mocktest.sh python-clikit
- pip_install_upgrade
- unwanted-content
required_packages:
- gcc
- virtualenv
@ -92,3 +93,4 @@
- grep
- util-linux
- shadow-utils
- beakerlib

View file

@ -0,0 +1,22 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,knclude Beakerlib
. /usr/share/beakerlib/beakerlib.sh || exit 1
PIP_RPM=${PIP_RPM:-python3-pip}
RPM_QL_LOG=/tmp/rmp_ql.log
rlJournalStart
rlPhaseStartSetup
rlRun "rpm -ql $PIP_RPM > $RPM_QL_LOG" 0 "Get filelist"
rlPhaseEnd
rlPhaseStartTest "No unwanted files present"
for ext in exe pem; do
rlRun "! grep ${ext}$ $RPM_QL_LOG"
done
rlPhaseEnd
rlPhaseStartCleanup
rlRun "rm -f $RPM_QL_LOG" 0 "Remove temp file"
rlPhaseEnd
rlJournalEnd