Skip to content

Commit 878e6ae

Browse files
committed
Auto merge of #1075 - tbu-:pr_test_statics, r=alexcrichton
Theoretically test statics There are none of them in `libc` except for `__progname` on Android, but that one cannot be tested because it's not present in any header files.
2 parents 995d7da + eb6bdf3 commit 878e6ae

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libc-test/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ path = ".."
99
default-features = false
1010

1111
[build-dependencies]
12-
ctest = "0.2"
12+
ctest = "0.2.2"
1313

1414
[features]
1515
default = [ "use_std" ]

libc-test/build.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,14 @@ fn main() {
794794
}
795795
});
796796

797+
cfg.skip_static(move |name| {
798+
match name {
799+
// Internal constant, not declared in any headers.
800+
"__progname" if android => true,
801+
_ => false,
802+
}
803+
});
804+
797805
cfg.skip_fn_ptrcheck(move |name| {
798806
match name {
799807
// dllimport weirdness?
@@ -849,7 +857,8 @@ fn main() {
849857
// fails on a lot of platforms.
850858
let mut cfg = ctest::TestGenerator::new();
851859
cfg.skip_type(|_| true)
852-
.skip_fn(|_| true);
860+
.skip_fn(|_| true)
861+
.skip_static(|_| true);
853862
if android || linux {
854863
// musl defines these directly in `fcntl.h`
855864
if musl {

0 commit comments

Comments
 (0)