Skip to content

Commit

Permalink
Auto merge of #1075 - tbu-:pr_test_statics, r=alexcrichton
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Sep 13, 2018
2 parents 995d7da + eb6bdf3 commit 878e6ae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion libc-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ path = ".."
default-features = false

[build-dependencies]
ctest = "0.2"
ctest = "0.2.2"

[features]
default = [ "use_std" ]
Expand Down
11 changes: 10 additions & 1 deletion libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,14 @@ fn main() {
}
});

cfg.skip_static(move |name| {
match name {
// Internal constant, not declared in any headers.
"__progname" if android => true,
_ => false,
}
});

cfg.skip_fn_ptrcheck(move |name| {
match name {
// dllimport weirdness?
Expand Down Expand Up @@ -849,7 +857,8 @@ fn main() {
// fails on a lot of platforms.
let mut cfg = ctest::TestGenerator::new();
cfg.skip_type(|_| true)
.skip_fn(|_| true);
.skip_fn(|_| true)
.skip_static(|_| true);
if android || linux {
// musl defines these directly in `fcntl.h`
if musl {
Expand Down

0 comments on commit 878e6ae

Please sign in to comment.