Add testing with align feature

This commit is contained in:
Linus Färnstrand 2018-07-20 11:15:25 +02:00
parent 6abe0b5218
commit 5f38367da3
2 changed files with 6 additions and 1 deletions

View File

@ -79,7 +79,7 @@ if [ "$QEMU" != "" ]; then
exec grep "^PASSED .* tests" $CARGO_TARGET_DIR/out.log
fi
# FIXME: x86_64-unknown-linux-gnux32 fail to compile wihout --release
# FIXME: x86_64-unknown-linux-gnux32 fail to compile without --release
# See https://github.com/rust-lang/rust/issues/45417
opt=
if [ "$TARGET" = "x86_64-unknown-linux-gnux32" ]; then
@ -91,4 +91,8 @@ fi
if [ "$TARGET" != "x86_64-rumprun-netbsd" ]; then
cargo test $opt --no-default-features --manifest-path libc-test/Cargo.toml --target $TARGET
fi
# Test the #[repr(align(x))] feature if this is building on Rust >= 1.25
if [ $(rustc --version | sed -E 's/^rustc 1\.([0-9]*)\..*/\1/') -ge 25 ]; then
cargo test $opt --features align --manifest-path libc-test/Cargo.toml --target $TARGET
fi
exec cargo test $opt --manifest-path libc-test/Cargo.toml --target $TARGET

View File

@ -14,6 +14,7 @@ ctest = { git = "https://github.com/alexcrichton/ctest" }
[features]
default = [ "use_std" ]
use_std = [ "libc/use_std" ]
align = [ "libc/align" ]
[[test]]
name = "main"