| 1 |
#!/bin/sh |
| 2 |
set -eux |
| 3 |
IMAGE="$1" |
| 4 |
|
| 5 |
if type podman >/dev/null 2>&1; then |
| 6 |
RUNC=podman |
| 7 |
else |
| 8 |
RUNC="sudo docker" |
| 9 |
fi |
| 10 |
|
| 11 |
# only run static code checks on a single release, too annoying to keep the code compatible with multiple versions |
| 12 |
if [ "${IMAGE%fedora:latest}" = "$IMAGE" ]; then |
| 13 |
SKIP_STATIC_CHECKS="1" |
| 14 |
fi |
| 15 |
|
| 16 |
OS=${IMAGE##*/} |
| 17 |
OS=${OS%:*} |
| 18 |
$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 |