Remove OpenBSD CI

It's now broken due to changes in the `gcc` crate and having a too-old compiler,
and in general it's unfortunately architecturally so different from the other
test frameworks that it's difficult to maintain over time.
This commit is contained in:
Alex Crichton 2017-08-18 09:20:11 -07:00
parent 7fd1f9d39b
commit 201d539465
9 changed files with 7 additions and 107 deletions

View File

@ -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

View File

@ -22,4 +22,4 @@ default = ["use_std"]
use_std = []
[workspace]
members = ["libc-test", "libc-test/generate-files"]
members = ["libc-test"]

View File

@ -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

View File

@ -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 \

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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 <alex@alexcrichton.com>"]
[[bin]]
name = "generate-files"
path = "../build.rs"
[dependencies]
ctest = "0.1"

View File

@ -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 <alex@alexcrichton.com>"]
build = "build-generated.rs"
[dependencies]
libc = { path = ".." }
[[bin]]
name = "libc-test"
path = "src/main-generated.rs"
[build-dependencies]
gcc = "0.3"

View File

@ -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");