Skip to content
Snippets Groups Projects
Commit 5f38367d authored by Linus Färnstrand's avatar Linus Färnstrand
Browse files

Add testing with align feature

parent 6abe0b52
No related branches found
No related tags found
No related merge requests found
...@@ -79,7 +79,7 @@ if [ "$QEMU" != "" ]; then ...@@ -79,7 +79,7 @@ if [ "$QEMU" != "" ]; then
exec grep "^PASSED .* tests" $CARGO_TARGET_DIR/out.log exec grep "^PASSED .* tests" $CARGO_TARGET_DIR/out.log
fi 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 # See https://github.com/rust-lang/rust/issues/45417
opt= opt=
if [ "$TARGET" = "x86_64-unknown-linux-gnux32" ]; then if [ "$TARGET" = "x86_64-unknown-linux-gnux32" ]; then
...@@ -91,4 +91,8 @@ fi ...@@ -91,4 +91,8 @@ fi
if [ "$TARGET" != "x86_64-rumprun-netbsd" ]; then if [ "$TARGET" != "x86_64-rumprun-netbsd" ]; then
cargo test $opt --no-default-features --manifest-path libc-test/Cargo.toml --target $TARGET cargo test $opt --no-default-features --manifest-path libc-test/Cargo.toml --target $TARGET
fi 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 exec cargo test $opt --manifest-path libc-test/Cargo.toml --target $TARGET
...@@ -14,6 +14,7 @@ ctest = { git = "https://github.com/alexcrichton/ctest" } ...@@ -14,6 +14,7 @@ ctest = { git = "https://github.com/alexcrichton/ctest" }
[features] [features]
default = [ "use_std" ] default = [ "use_std" ]
use_std = [ "libc/use_std" ] use_std = [ "libc/use_std" ]
align = [ "libc/align" ]
[[test]] [[test]]
name = "main" name = "main"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment