Debian Codegraph @

debian/tests/cyrus-docker

raw
1 #!/bin/bash
2
3 set -e
4
5 srcdir="$(pwd)"
6
7 cd debian/tests/docker
8
9 # build image
10 docker build --rm -t cyrus-test -f Dockerfile.sid .
11
12 # get local repository path
13 source_list="/etc/apt/sources.list.d/autopkgtest.list"
14 p=$(perl -pe 's#.*file://([^ ]+).*#$1#' $source_list)
15
16 # run it
17 #
18 # The Cassandane suite comes from this source tree, not from the archived
19 # https://github.com/cyrusimap/cassandane repository; bind-mount it into
20 # the container and let _cassandane() copy it to a writable location.
21 docker run --rm \
22 -v ${source_list}:${source_list} \
23 -v ${p}:${p} \
24 -v "${srcdir}/cassandane":/srv/cassandane.src:ro \
25 -e BUILD_CYRUS_FROM_SOURCE="no" \
26 -e CASSANDANESRC="/srv/cassandane.src" \
27 -e CASSANDANEOPTS="Cyrus::ImapTest Cyrus::ACL Cyrus::Delete Cyrus::MIME Cyrus::Search Cyrus::URLAuth Cyrus::XApplePushService" \
28 cyrus-test