Support INSTALL_OR_SKIP for marshalparser test
This commit is contained in:
parent
6cc91d52a7
commit
59f2079f68
1 changed files with 10 additions and 0 deletions
|
|
@ -15,6 +15,16 @@ VERSION=${VERSION:-3.9}
|
|||
# How many randomly-selected pyc files to check?
|
||||
SAMPLE=${SAMPLE:-50}
|
||||
|
||||
# This allows us to test marshalparser optionally: on Fedora 33+ only
|
||||
INSTALL_OR_SKIP=${INSTALL_OR_SKIP:-false}
|
||||
if [ "$INSTALL_OR_SKIP" == "true" ] && [ ! -f "/usr/bin/marshalparser" ]; then
|
||||
dnf -y install marshalparser || :
|
||||
if [ ! -f "/usr/bin/marshalparser" ]; then
|
||||
echo "marshalparser not installable, skipping this test"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
path="/usr/lib*/python$VERSION/"
|
||||
|
||||
for file in `find $path -name "*.pyc" | shuf | head -n $SAMPLE`; do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue