diff --git a/.travis.yml b/.travis.yml index 4a397979..c63272ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -79,9 +79,6 @@ matrix: # QEMU based targets that compile in an emulator - env: TARGET=x86_64-unknown-freebsd - - env: TARGET=x86_64-unknown-openbsd QEMU=openbsd.qcow2 - script: sh ci/run-docker.sh $TARGET - install: cache: cargo diff --git a/Cargo.toml b/Cargo.toml index cb8af7aa..bacf8b6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,4 +22,4 @@ default = ["use_std"] use_std = [] [workspace] -members = ["libc-test", "libc-test/generate-files"] +members = ["libc-test"] diff --git a/ci/docker/x86_64-unknown-openbsd/Dockerfile b/ci/docker/x86_64-unknown-openbsd/Dockerfile deleted file mode 100644 index 518baf87..00000000 --- a/ci/docker/x86_64-unknown-openbsd/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM ubuntu:16.10 - -RUN apt-get update -RUN apt-get install -y --no-install-recommends \ - gcc libc6-dev qemu curl ca-certificates \ - genext2fs -ENV PATH=$PATH:/rust/bin \ - QEMU=2016-11-06/openbsd-6.0-without-pkgs.qcow2 diff --git a/ci/run.sh b/ci/run.sh index 54e2129f..1b8226e5 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -39,36 +39,11 @@ if [ "$QEMU" != "" ]; then rm -f $tmpdir/libc-test.img mkdir $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 - # binary. - # - # If we don't have a cross-compiler, however, then we need to do some crazy - # acrobatics to get this to work. Generate all.{c,rs} on the host which will - # be compiled inside QEMU. Do this here because compiling syntex_syntax in - # QEMU would time out basically everywhere. - if [ "$CAN_CROSS" = "1" ]; then - cargo build --manifest-path libc-test/Cargo.toml --target $TARGET - cp $CARGO_TARGET_DIR/$TARGET/debug/libc-test $tmpdir/mount/ - echo 'exec $1/libc-test' > $tmpdir/mount/run.sh - else - rm -rf $tmpdir/generated - mkdir -p $tmpdir/generated - cargo build --manifest-path libc-test/generate-files/Cargo.toml - (cd libc-test && TARGET=$TARGET OUT_DIR=$tmpdir/generated SKIP_COMPILE=1 \ - $CARGO_TARGET_DIR/debug/generate-files) - - # Copy this folder into the mounted image, the `run.sh` entry point, and - # overwrite the standard libc-test Cargo.toml with the overlay one which will - # assume the all.{c,rs} test files have already been generated - mkdir $tmpdir/mount/libc - cp -r Cargo.* libc-test src ci $tmpdir/mount/libc/ - ln -s libc-test/target $tmpdir/mount/libc/target - cp ci/run-qemu.sh $tmpdir/mount/run.sh - echo $TARGET | tee -a $tmpdir/mount/TARGET - cp $tmpdir/generated/* $tmpdir/mount/libc/libc-test - cp libc-test/run-generated-Cargo.toml $tmpdir/mount/libc/libc-test/Cargo.toml - fi + # Do the standard rigamarole of cross-compiling an executable and then the + # script to run just executes the binary. + cargo build --manifest-path libc-test/Cargo.toml --target $TARGET + cp $CARGO_TARGET_DIR/$TARGET/debug/libc-test $tmpdir/mount/ + echo 'exec $1/libc-test' > $tmpdir/mount/run.sh du -sh $tmpdir/mount genext2fs \ diff --git a/libc-test/build-generated.rs b/libc-test/build-generated.rs deleted file mode 100644 index a51c0e37..00000000 --- a/libc-test/build-generated.rs +++ /dev/null @@ -1,16 +0,0 @@ -// This build script is distinct from the standard build.rs as it is only used -// for the BSDs which run a stripped down version. The `all.c` file is assumed -// to have been already generated for this build script. - -extern crate gcc; - -fn main() { - gcc::Config::new() - .file("all.c") - .flag("-Wall") - .flag("-Wextra") - .flag("-Werror") - .flag("-Wno-deprecated-declarations") - .flag("-Wno-type-limits") - .compile("liball.a"); -} diff --git a/libc-test/build.rs b/libc-test/build.rs index b907e3cc..6b6e865e 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -641,9 +641,5 @@ fn main() { } }); - if env::var("SKIP_COMPILE").is_ok() { - cfg.generate_files("../src/lib.rs", "all.rs"); - } else { - cfg.generate("../src/lib.rs", "all.rs"); - } + cfg.generate("../src/lib.rs", "all.rs"); } diff --git a/libc-test/generate-files/Cargo.toml b/libc-test/generate-files/Cargo.toml deleted file mode 100644 index 8c198562..00000000 --- a/libc-test/generate-files/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -# Cargo.toml which is used to just generate the all.{c,rs} files used to test -# some platforms. These files are then combined with the overlay files commented -# in the above directory as well to assemble a libc-test project which will -# compile/run all tests. - -[package] -name = "generate-files" -version = "0.1.0" -authors = ["Alex Crichton "] - -[[bin]] -name = "generate-files" -path = "../build.rs" - -[dependencies] -ctest = "0.1" diff --git a/libc-test/run-generated-Cargo.toml b/libc-test/run-generated-Cargo.toml deleted file mode 100644 index 64862a51..00000000 --- a/libc-test/run-generated-Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -# Note that this Cargo.toml is not used by default, it is only intended to be -# used on the BSDs where it is too expensive to compile syntex_syntax in a QEMU -# emulator without KVM. Scripts will move this file into place on the BSD CI. - -[package] -name = "libc-test" -version = "0.1.0" -authors = ["Alex Crichton "] -build = "build-generated.rs" - -[dependencies] -libc = { path = ".." } - -[[bin]] -name = "libc-test" -path = "src/main-generated.rs" - -[build-dependencies] -gcc = "0.3" diff --git a/libc-test/src/main-generated.rs b/libc-test/src/main-generated.rs deleted file mode 100644 index 608fe4ea..00000000 --- a/libc-test/src/main-generated.rs +++ /dev/null @@ -1,9 +0,0 @@ -// Note that this main file is meant to mirror `main.rs` but is only used on the -// BSDs where the generated location of `all.rs` is slightly different - -#![allow(bad_style, improper_ctypes)] -extern crate libc; - -use libc::*; - -include!("../all.rs");