Skip to content
Snippets Groups Projects
Commit 0b05b2a8 authored by Marco A L Barbosa's avatar Marco A L Barbosa
Browse files

Enable kvm in docker images if available

parent 05a2d197
No related branches found
No related tags found
No related merge requests found
......@@ -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 \
......
......@@ -111,7 +111,11 @@ case "$TARGET" in
# https://issues.jenkins-ci.org/browse/JENKINS-26930?focusedCommentId=230791&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-230791
export SHELL=/bin/dash
arch=$(echo $TARGET | cut -d- -f1)
emulator @$arch -no-window -no-accel &
accel="-no-accel"
if emulator -accel-check; then
accel=""
fi
emulator @$arch -no-window $accel &
adb wait-for-device
adb push $CARGO_TARGET_DIR/$TARGET/debug/libc-test /data/local/tmp/libc-test
adb shell /data/local/tmp/libc-test 2>&1 | tee /tmp/out
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment