Skip to content

Commit

Permalink
Add testing with align feature
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Jul 20, 2018
1 parent 5469e06 commit 555bf67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions libc-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 555bf67

Please sign in to comment.