File: blackbox

package info (click to toggle)
fuse-zip 0.7.2-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 9,776 kB
  • sloc: cpp: 5,509; sh: 2,587; makefile: 193
file content (32 lines) | stat: -rwxr-xr-x 1,061 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash

exec 10>&1
export BASH_XTRACEFD=10
set -ex

test -c /dev/fuse || sudo mknod -m 666 /dev/fuse c 10 229
test -f /etc/mtab || sudo ln -s ../proc/self/mounts /etc/mtab

if [ -z "$AUTOPKGTEST_TMP" ]; then
  AUTOPKGTEST_TMP=$(mktemp -d /tmp/mount-zip-test.XXX)
  trap 'rm -r "$AUTOPKGTEST_TMP"' EXIT
else
  # We are sure to be run from within autopkgtest, then apply a change
  # to the config that is required for the test "special-device-create":
  # We must permit 'allow_other' option, otherwise error is
  #    Filesystem output: fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
  #
  sudo sed -i "/^#user_allow_other/ s/^#//" /etc/fuse.conf
fi

mkdir "$AUTOPKGTEST_TMP"/x
cp -r tests/blackbox/ "$AUTOPKGTEST_TMP"/x/blackbox
cd "$AUTOPKGTEST_TMP"
ln -s /usr/bin/fuse-zip .
cd x/blackbox/
if command -v valgrind > /dev/null; then
  exec ./fuse-zip.test -valgrind -sudo
else
  # valgrind is not available on all arch. Don't run valgrind tests when its binary is not installed.
  exec ./fuse-zip.test -sudo
fi