about summary refs log tree commit diff
path: root/src/ci/docker/armhf-gnu
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-07-13 14:17:33 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-07-24 16:24:52 -0700
commit8ef3f69ffb03f8b5c83c44a6300bdfc8f73f6296 (patch)
tree657b27713b42c8daee9e8cf62df8ad9be4b7720f /src/ci/docker/armhf-gnu
parentb80e946101dd49dd1864b6229f9430c55036c7ce (diff)
downloadrust-8ef3f69ffb03f8b5c83c44a6300bdfc8f73f6296.tar.gz
rust-8ef3f69ffb03f8b5c83c44a6300bdfc8f73f6296.zip
Add a disabled builder for aarch64 emulated tests
This commit adds a disabled builder which will run all tests for the standard
library for aarch64 in a QEMU instance. Once we get enough capacity to run this
on Travis this can be used to boost our platform coverage of AArch64
Diffstat (limited to 'src/ci/docker/armhf-gnu')
-rw-r--r--src/ci/docker/armhf-gnu/Dockerfile4
-rw-r--r--src/ci/docker/armhf-gnu/addentropy.c43
-rw-r--r--src/ci/docker/armhf-gnu/rcS28
3 files changed, 2 insertions, 73 deletions
diff --git a/src/ci/docker/armhf-gnu/Dockerfile b/src/ci/docker/armhf-gnu/Dockerfile
index d289a93c352..14785b706fb 100644
--- a/src/ci/docker/armhf-gnu/Dockerfile
+++ b/src/ci/docker/armhf-gnu/Dockerfile
@@ -63,11 +63,11 @@ RUN curl http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-bas
 
 # Copy over our init script, which starts up our test server and also a few
 # other misc tasks.
-COPY armhf-gnu/rcS rootfs/etc/init.d/rcS
+COPY scripts/qemu-bare-bones-rcS rootfs/etc/init.d/rcS
 RUN chmod +x rootfs/etc/init.d/rcS
 
 # Helper to quickly fill the entropy pool in the kernel.
-COPY armhf-gnu/addentropy.c /tmp/
+COPY scripts/qemu-bare-bones-addentropy.c /tmp/addentropy.c
 RUN arm-linux-gnueabihf-gcc addentropy.c -o rootfs/addentropy -static
 
 # TODO: What is this?!
diff --git a/src/ci/docker/armhf-gnu/addentropy.c b/src/ci/docker/armhf-gnu/addentropy.c
deleted file mode 100644
index 8975739e3c0..00000000000
--- a/src/ci/docker/armhf-gnu/addentropy.c
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#include <assert.h>
-#include <stdint.h>
-#include <sys/ioctl.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <linux/random.h>
-
-#define N 2048
-
-struct entropy {
-  int ent_count;
-  int size;
-  unsigned char data[N];
-};
-
-int main() {
-  struct entropy buf;
-  ssize_t n;
-
-  int random_fd = open("/dev/random", O_RDWR);
-  assert(random_fd >= 0);
-
-  while ((n = read(0, &buf.data, N)) > 0) {
-    buf.ent_count = n * 8;
-    buf.size = n;
-    if (ioctl(random_fd, RNDADDENTROPY, &buf) != 0) {
-      perror("failed to add entropy");
-    }
-  }
-
-  return 0;
-}
diff --git a/src/ci/docker/armhf-gnu/rcS b/src/ci/docker/armhf-gnu/rcS
deleted file mode 100644
index 3c29bedc13c..00000000000
--- a/src/ci/docker/armhf-gnu/rcS
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-mount -t proc none /proc
-mount -t sysfs none /sys
-/sbin/mdev -s
-
-# fill up our entropy pool, if we don't do this then anything with a hash map
-# will likely block forever as the kernel is pretty unlikely to have enough
-# entropy.
-/addentropy < /addentropy
-cat /dev/urandom | head -n 2048 | /addentropy
-
-# Set up IP that qemu expects. This confgures eth0 with the public IP that QEMU
-# will communicate to as well as the loopback 127.0.0.1 address.
-ifconfig eth0 10.0.2.15
-ifconfig lo up
-
-# Configure DNS resolution of 'localhost' to work
-echo 'hosts:      files dns' >> /ubuntu/etc/nsswitch.conf
-echo '127.0.0.1    localhost' >> /ubuntu/etc/hosts
-
-# prepare the chroot
-mount -t proc proc /ubuntu/proc/
-mount --rbind /sys /ubuntu/sys/
-mount --rbind /dev /ubuntu/dev/
-
-# Execute our `testd` inside the ubuntu chroot
-cp /testd /ubuntu/testd
-chroot /ubuntu /testd &