File: run-testsuite-if-acls-enabled

package info (click to toggle)
python-pylibacl 0.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 372 kB
  • sloc: ansic: 1,443; python: 913; makefile: 86; sh: 16
file content (21 lines) | stat: -rwxr-xr-x 644 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

TESTFILE="$AUTOPKGTEST_TMP/foo"

touch "$TESTFILE"

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"
  # 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 :("
fi