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.
This commit is contained in:
parent
267375e999
commit
8b1d846444
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -20,7 +20,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "ctest"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -85,7 +85,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
name = "libc-test"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"ctest 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ctest 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43",
|
||||
]
|
||||
|
||||
@ -281,7 +281,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
"checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789"
|
||||
"checksum cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "2119ea4867bd2b8ed3aecab467709720b2d55b1bcfe09f772fd68066eaf15275"
|
||||
"checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3"
|
||||
"checksum ctest 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfb5b62c8bba3ca51cb21a3d3f8506074d1364ca5f53cf28ed1c07311bb1080c"
|
||||
"checksum ctest 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4b718a166edf13d35f395a3bf1155b1e9b10d48bd1a53dec07c389c51a3cb8"
|
||||
"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd"
|
||||
"checksum extprim 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "054bc2552b3f66fa8097e29e47255bfff583c08e737a67cbbb54b817ddaa5206"
|
||||
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
|
||||
|
@ -9,7 +9,7 @@ path = ".."
|
||||
default-features = false
|
||||
|
||||
[build-dependencies]
|
||||
ctest = "0.2"
|
||||
ctest = "0.2.1"
|
||||
|
||||
[features]
|
||||
default = [ "use_std" ]
|
||||
|
@ -432,6 +432,7 @@ fn main() {
|
||||
cfg.skip_struct(move |ty| {
|
||||
match ty {
|
||||
"sockaddr_nl" => musl,
|
||||
"ucontext_t" => true,
|
||||
|
||||
// On Linux, the type of `ut_tv` field of `struct utmpx`
|
||||
// can be an anonymous struct, so an extra struct,
|
||||
@ -639,6 +640,7 @@ fn main() {
|
||||
s if ios && s.starts_with("RTV_") => true,
|
||||
s if ios && s.starts_with("DLT_") => true,
|
||||
|
||||
"NFT_MSG_MAX" => true,
|
||||
_ => false,
|
||||
}
|
||||
});
|
||||
@ -789,6 +791,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?
|
||||
@ -844,7 +854,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 {
|
||||
|
Loading…
Reference in New Issue
Block a user