From b8262e69612c94c34da1b2b17122e4d73a66b4c9 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Sun, 23 Apr 2023 23:01:39 +0200 Subject: [PATCH] =?utf8?q?Fix=20autopkg=20tests=20to=20actually=20run=20te?= =?utf8?q?sts=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- debian/changelog | 5 ++++- debian/tests/run-testsuite-if-acls-enabled | 8 +++++++- debian/tests/simple | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4154dba..476c1c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,8 +8,11 @@ python-pylibacl (0.7.0-1) sid; urgency=medium [ Iustin Pop ] * New (minor) upstream release (error handling improvements, testing improvements, adopt to more modern Python guidelines). + * Fix autopkgtests to actually run the upstream tests, and that it will + always used the installed version, no matter which flavour of sources + is passed to autopkg. Sigh. - -- Iustin Pop Sun, 23 Apr 2023 22:37:00 +0200 + -- Iustin Pop Sun, 23 Apr 2023 23:09:07 +0200 python-pylibacl (0.6.0-3) unstable; urgency=medium diff --git a/debian/tests/run-testsuite-if-acls-enabled b/debian/tests/run-testsuite-if-acls-enabled index 5251ba3..15ba4e8 100755 --- a/debian/tests/run-testsuite-if-acls-enabled +++ b/debian/tests/run-testsuite-if-acls-enabled @@ -8,7 +8,13 @@ if setfacl -m u:root:r "$TESTFILE"; then echo "Temporary directory '$AUTOPKGTEST_TMP' has ACLs enabled, running tests" export TEST_DIR="$AUTOPKGTEST_TMP" echo "* testing Python 3" - python3 tests/test_acls.py + # Change to temp directory to ensure any built version of the + # library is not used. + cp tests/test_acls.py "$AUTOPKGTEST_TMP" + cd "$AUTOPKGTEST_TMP" + # Show the used library path. + python3 -c 'import posix1e; print(posix1e)' + python3 -m pytest test_acls.py else echo "Temporary directory '$AUTOPKGTEST_TMP' doesn't have extended attributes enabled" echo "Skipping the tests :(" diff --git a/debian/tests/simple b/debian/tests/simple index e2ad64e..d698c57 100755 --- a/debian/tests/simple +++ b/debian/tests/simple @@ -1,3 +1,6 @@ #!/bin/sh +# Change directory to ensure built version is not used. + +cd "$AUTOPKGTEST_TMP" python3 -c 'import posix1e; print(posix1e)' -- 2.39.5