Run tests as regular user
For this to work, we run the smoke test from a temporary directory, on the CI /var/str/smoke is not writable by non-root.
This commit is contained in:
parent
fd113d4cf8
commit
18de9ca2b3
2 changed files with 27 additions and 19 deletions
|
|
@ -11,8 +11,9 @@ TOX=${TOX:-true}
|
|||
CYTHON=${CYTHON:-true}
|
||||
INSTALL_OR_SKIP=${INSTALL_OR_SKIP:-false}
|
||||
|
||||
# clean from possible older runs
|
||||
rm -rf venv .tox __pycache__ .pytest* test_*.py *.pyx *.c *.so ensurepiptestroot || :
|
||||
# Work from a custom directory
|
||||
workdir="$(mktemp --directory)"
|
||||
cd "$workdir"
|
||||
|
||||
if [ "$INSTALL_OR_SKIP" == "true" ] && [ ! -f "/usr/bin/$PYTHON" ]; then
|
||||
dnf -y install "/usr/bin/$PYTHON" || :
|
||||
|
|
@ -130,3 +131,7 @@ EOF
|
|||
|
||||
# A more complex example with pytest
|
||||
tox
|
||||
|
||||
# Clean up if everything else went well
|
||||
cd -
|
||||
rm -rf "$workdir"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue