summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXiretza2020-09-28 16:04:09 +0200
committerIgor Dejanovic2020-10-03 19:23:03 +0200
commit51bafeb29077157a8abce12a8f21917346c26521 (patch)
treeebbca4e2bc3254a364dcb61277c146b650ac86cd /PKGBUILD
parente461f218ee7305dda5d00d9669c89c30f305d7f8 (diff)
downloadaur-51bafeb29077157a8abce12a8f21917346c26521.tar.gz
Install test deps to tmpdir, add bindir to PATH
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD8
1 files changed, 6 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e50e44d3f44e..d34034edb262 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,9 +20,11 @@ build() {
}
check() {
-
cd $_srcname-$pkgver
+ tmpdir=$(mktemp -d)
+ export PYTHONUSERBASE="$tmpdir"
+
# Install all tests projects
pip install --user -e . || exit 1
pip install --user -e tests/functional/subcommands/example_project || exit 1
@@ -32,7 +34,7 @@ check() {
pip install --user -e tests/functional/registration/projects/flow_codegen || exit 1
# Run all tests
- python setup.py pytest --addopts tests/functional
+ PATH="$tmpdir/bin:$PATH" pytest --ignore tests/perf
# Uninstall all test projects
pip uninstall -y textX || exit 1
@@ -41,6 +43,8 @@ check() {
pip uninstall -y data_dsl || exit 1
pip uninstall -y flow_dsl || exit 1
pip uninstall -y flow_codegen || exit 1
+
+ rm -rf "$tmpdir"
}
package() {