Skip to content

Commit 555bf67

Browse files
committed
Add testing with align feature
1 parent 5469e06 commit 555bf67

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ci/run.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ if [ "$QEMU" != "" ]; then
7979
exec grep "^PASSED .* tests" $CARGO_TARGET_DIR/out.log
8080
fi
8181

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

libc-test/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ctest = { git = "https://github.com/alexcrichton/ctest" }
1414
[features]
1515
default = [ "use_std" ]
1616
use_std = [ "libc/use_std" ]
17+
align = [ "libc/align" ]
1718

1819
[[test]]
1920
name = "main"

0 commit comments

Comments
 (0)