Skip to content

Use workspaces in this repo #422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions libc-test/Cargo.lock → Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ other common platform libraries.
[features]
default = ["use_std"]
use_std = []

[workspace]
members = ["libc-test", "libc-test/generate-files"]
4 changes: 4 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ build: false
test_script:
- cargo test
- cargo run --manifest-path libc-test/Cargo.toml

cache:
- target
- C:\Users\appveyor\.cargo\registry
3 changes: 2 additions & 1 deletion ci/docker/i686-unknown-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \
make CROSS_COMPILE= install -j4 && \
cd .. && \
rm -rf musl-1.1.15
ENV PATH=$PATH:/musl-i686/bin:/rust/bin
ENV PATH=$PATH:/musl-i686/bin:/rust/bin \
CC_i686_unknown_linux_musl=musl-gcc
2 changes: 1 addition & 1 deletion ci/docker/x86_64-unknown-freebsd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ USER root

RUN apt-get update
RUN apt-get install -y --no-install-recommends \
qemu qemu-kvm kmod cpu-checker
qemu genext2fs

ENTRYPOINT ["sh"]

Expand Down
3 changes: 2 additions & 1 deletion ci/docker/x86_64-unknown-openbsd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM ubuntu:16.10

RUN apt-get update
RUN apt-get install -y --no-install-recommends \
gcc libc6-dev qemu qemu-kvm curl ca-certificates kmod cpu-checker
gcc libc6-dev qemu curl ca-certificates \
genext2fs
ENV PATH=$PATH:/rust/bin \
QEMU=2016-09-07/openbsd-6.0-without-pkgs.qcow2
1 change: 1 addition & 0 deletions ci/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ run() {
echo $1
docker build -t libc ci/docker/$1
docker run \
--rm \
-v `rustc --print sysroot`:/rust:ro \
-v `pwd`:/checkout:ro \
-e CARGO_TARGET_DIR=/tmp/target \
Expand Down
20 changes: 6 additions & 14 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ if [ "$QEMU" != "" ]; then
# This will have a `run.sh` script will which use the artifacts inside to run
# on the host.
rm -f $tmpdir/libc-test.img
dd if=/dev/null of=$tmpdir/libc-test.img bs=1M seek=50
mkfs.ext2 -F $tmpdir/libc-test.img
rm -rf $tmpdir/mount
mkdir $tmpdir/mount
mount -t ext2 -o loop $tmpdir/libc-test.img $tmpdir/mount

# If we have a cross compiler, then we just do the standard rigamarole of
# cross-compiling an executable and then the script to run just executes the
Expand Down Expand Up @@ -74,22 +70,18 @@ if [ "$QEMU" != "" ]; then
cp libc-test/run-generated-Cargo.toml $tmpdir/mount/libc/libc-test/Cargo.toml
fi

umount $tmpdir/mount

# If we can use kvm, prefer that, otherwise just fall back to user-space
# emulation.
if kvm-ok; then
program=kvm
else
program=qemu-system-x86_64
fi
du -sh $tmpdir/mount
genext2fs \
--root $tmpdir/mount \
--size-in-blocks 100000 \
$tmpdir/libc-test.img

# Pass -snapshot to prevent tampering with the disk images, this helps when
# running this script in development. The two drives are then passed next,
# first is the OS and second is the one we just made. Next the network is
# configured to work (I'm not entirely sure how), and then finally we turn off
# graphics and redirect the serial console output to out.log.
$program \
qemu-system-x86_64 \
-m 1024 \
-snapshot \
-drive if=virtio,file=$tmpdir/$qemufile \
Expand Down
123 changes: 0 additions & 123 deletions libc-test/generate-files/Cargo.lock

This file was deleted.