diff --git a/ci/run-docker.sh b/ci/run-docker.sh index 1ac419a349c0865bff5268ca022b8b95d02cb2a9..c14f34c50315c4281fca70e962adde5dafaa3959 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 \ diff --git a/ci/run.sh b/ci/run.sh index 1b6e0fb1d4549cf86594b666151da2fd032cf6cc..f854eb6faaa80622f7bcd433b7437e0f4a325067 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -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