summaryrefslogtreecommitdiff
path: root/ci/run-docker.sh
diff options
context:
space:
mode:
authorMarco A L Barbosa <malbarbo@gmail.com>2017-04-19 10:59:04 -0300
committerMarco A L Barbosa <malbarbo@gmail.com>2017-04-19 10:59:04 -0300
commit0b05b2a845b6249d2903f899e1b2532b93452b71 (patch)
treee0b900f19826338eb7058ffa6d03d1331afd2e1c /ci/run-docker.sh
parent05a2d197356ef253dfd985166576619ac9b6947f (diff)
downloadrust-libc-0b05b2a845b6249d2903f899e1b2532b93452b71.tar.gz
Enable kvm in docker images if available
Diffstat (limited to 'ci/run-docker.sh')
-rw-r--r--ci/run-docker.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/ci/run-docker.sh b/ci/run-docker.sh
index 1ac419a349..c14f34c503 100644
--- a/ci/run-docker.sh
+++ b/ci/run-docker.sh
@@ -8,10 +8,14 @@ run() {
# use -f so we can use ci/ as build context
docker build -t libc -f ci/docker/$1/Dockerfile ci/
mkdir -p target
+ if [ -w /dev/kvm ]; then
+ kvm="--volume /dev/kvm:/dev/kvm"
+ fi
docker run \
--user `id -u`:`id -g` \
--rm \
--volume $HOME/.cargo:/cargo \
+ $kvm \
--env CARGO_HOME=/cargo \
--volume `rustc --print sysroot`:/rust:ro \
--volume `pwd`:/checkout:ro \