File: destructive

package info (click to toggle)
game-data-packager 87
  • links: PTS, VCS
  • area: contrib
  • in suites: sid
  • size: 33,392 kB
  • sloc: python: 15,387; sh: 704; ansic: 95; makefile: 50
file content (27 lines) | stat: -rwxr-xr-x 703 bytes parent folder | download | duplicates (4)
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
#!/bin/sh
# Copyright 2023 Simon McVittie
# SPDX-License-Identifier: FSFAP

set -eu

export GDP_BUILDDIR="$(echo obj-*)"
export GDP_TEST_DESTRUCTIVE=yes

cat > "$AUTOPKGTEST_TMP/apt.conf" <<EOF
APT::Get::Assume-Yes "true";
EOF
export APT_CONFIG="$AUTOPKGTEST_TMP/apt.conf"

cat > "$AUTOPKGTEST_TMP/10-local-autopkgtest.rules" <<EOF
// Make members of group sudo trivially root-equivalent
polkit.addRule(function(action, subject) {
    if (subject.isInGroup("sudo")) {
        return polkit.Result.YES;
    }
    return polkit.Result.NOT_HANDLED;
});
EOF
sudo install -m644 "$AUTOPKGTEST_TMP/10-local-autopkgtest.rules" \
    /etc/polkit-1/rules.d/10-local-autopkgtest.rules

exec ./tests/integration.py