]> git.k1024.org Git - debian-pylibacl.git/blob - debian/tests/run-testsuite-if-acls-enabled
Release 0.7.0-2 with segfault fix on s390x
[debian-pylibacl.git] / debian / tests / run-testsuite-if-acls-enabled
1 #!/bin/sh
2
3 TESTFILE="$AUTOPKGTEST_TMP/foo"
4
5 touch "$TESTFILE"
6
7 if setfacl -m u:root:r "$TESTFILE"; then
8   echo "Temporary directory '$AUTOPKGTEST_TMP' has ACLs enabled, running tests"
9   export TEST_DIR="$AUTOPKGTEST_TMP"
10   echo "* testing Python 3"
11   # Change to temp directory to ensure any built version of the
12   # library is not used.
13   cp tests/test_acls.py "$AUTOPKGTEST_TMP"
14   cd "$AUTOPKGTEST_TMP"
15   # Show the used library path.
16   python3 -c 'import posix1e; print(posix1e)'
17   python3 -m pytest test_acls.py
18 else
19   echo "Temporary directory '$AUTOPKGTEST_TMP' doesn't have extended attributes enabled"
20   echo "Skipping the tests :("
21 fi