File: run

package info (click to toggle)
python-dbusmock 0.36.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 812 kB
  • sloc: python: 7,324; sh: 73; makefile: 4
file content (18 lines) | stat: -rwxr-xr-x 529 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
set -eux
IMAGE="$1"

if type podman >/dev/null 2>&1; then
    RUNC=podman
else
    RUNC="sudo docker"
fi

# only run static code checks on a single release, too annoying to keep the code compatible with multiple versions
if [ "${IMAGE%fedora:latest}" = "$IMAGE" ]; then
    SKIP_STATIC_CHECKS="1"
fi

OS=${IMAGE##*/}
OS=${OS%:*}
$RUNC run --interactive -e DEBUG=${DEBUG:-} -e SKIP_STATIC_CHECKS="${SKIP_STATIC_CHECKS:-}" --rm ${RUNC_OPTIONS:-} --volume `pwd`:/source:ro --workdir /source "$IMAGE" /bin/sh tests/run-$OS