Update gating tests to be tmt compatible
This commit is contained in:
parent
e7e76c0934
commit
ecb6d94944
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
8
plans/all.fmf
Normal file
8
plans/all.fmf
Normal file
@ -0,0 +1,8 @@
|
||||
summary: Run gating tests
|
||||
discover:
|
||||
how: fmf
|
||||
dist-git-source: true
|
||||
dist-git-type: centos
|
||||
|
||||
execute:
|
||||
how: tmt
|
6
tests/main.fmf
Normal file
6
tests/main.fmf
Normal file
@ -0,0 +1,6 @@
|
||||
summary: Run python-oauthlib upstream tests
|
||||
require:
|
||||
- httpd
|
||||
- python-oauthlib
|
||||
test: ./oauthtests.sh
|
||||
duration: 30m
|
@ -1,5 +1,7 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
PKG="python-oauthlib"
|
||||
|
||||
die () {
|
||||
echo "$1" >&2
|
||||
exit 1
|
||||
@ -14,10 +16,23 @@ fi
|
||||
# install dependencies (pytest & blinker)
|
||||
#
|
||||
rm -rf venv
|
||||
python3 -m venv venv
|
||||
python3 -m venv --system-site-packages --symlinks venv
|
||||
. venv/bin/activate
|
||||
pip install -r requirements-tests.txt
|
||||
|
||||
# If source not found, download it with dnf
|
||||
if [ ! -d ./source ]; then
|
||||
# Extract source from srpm
|
||||
echo "## source directory not found. attempting to download via rpm"
|
||||
dnf download --source ${PKG} && \
|
||||
rpm2cpio ${PKG}*.rpm|cpio -id && \
|
||||
mkdir source && \
|
||||
tar -zxf ${PKG}-*.tar.gz -C source --strip-components=1
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to download upstream tests"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# rename source code directory to be sure that we are
|
||||
# testing files from our rpm
|
||||
@ -25,7 +40,7 @@ cd source || die "Missing source directory!"
|
||||
if [ -d oauthlib ] ; then
|
||||
mv oauthlib oauthlib.backup || die "Can't rename/hide source code directory!"
|
||||
fi
|
||||
ln -s $SITEDIR/oauthlib || die "Can't locate installed library"
|
||||
# ln -s $SITEDIR/oauthlib || die "Can't locate installed library"
|
||||
|
||||
#
|
||||
# run upstream tests, skip jwt tests
|
||||
|
Loading…
Reference in New Issue
Block a user