Lines Matching +full:test +full:- +full:crates
3 #[test]
5 // Test whether `has_dependency` works. `cargo tree` no longer works in in test_backends()
7 // and hermit-core isn't compatible with Rust 1.48. in test_backends()
8 if !has_dependency(".", &[], &[], &[], "io-lifetimes") { in test_backends()
13 // ensure that the use-default crate uses it. in test_backends()
18 "test-crates/use-default", in test_backends()
22 "linux-raw-sys" in test_backends()
24 "use-default does not depend on linux-raw-sys" in test_backends()
29 // ensure that the use-rustix-auxv crate uses it, and does not use libc. in test_backends()
32 // TODO: Re-enable this test once io-lifetimes can depend on Rust 1.63 in test_backends()
37 "test-crates/use-rustix-auxv", in test_backends()
43 "use-rustix-auxv depends on libc" in test_backends()
49 "test-crates/use-rustix-auxv", in test_backends()
53 "linux-raw-sys" in test_backends()
55 "use-rustix-auxv does not depend on linux-raw-sys" in test_backends()
60 let libc_dep = "windows-sys"; in test_backends()
65 // rust-errno updates to windows-sys 0.48. in test_backends()
73 // Test the use-libc crate, which enables the "use-libc" cargo feature. in test_backends()
75 has_dependency("test-crates/use-libc", &[], &[], &["RUSTFLAGS"], libc_dep), in test_backends()
76 "use-libc doesn't depend on {}", in test_backends()
80 // Test the use-default crate with `--cfg=rustix_use_libc`. in test_backends()
83 "test-crates/use-default", in test_backends()
85 &[("RUSTFLAGS", "--cfg=rustix_use_libc")], in test_backends()
89 "use-default with --cfg=rustix_use_libc does not depend on {}", in test_backends()
93 // Test the use-default crate with `--features=rustix/use-libc`. in test_backends()
96 "test-crates/use-default", in test_backends()
97 &["--features=rustix/use-libc"], in test_backends()
102 "use-default with --features=rustix/use-libc does not depend on {}", in test_backends()
107 /// Test whether the crate at directory `dir` has a dependency on `dependency`,
116 ) -> bool { in has_dependency()
121 .arg("--quiet") in has_dependency()
122 .arg("--edges=normal") in has_dependency()
123 .arg(&format!("--invert={}", dependency)) in has_dependency()
136 // `cargo tree --invert=foo` can fail in two different ways: it exits with in has_dependency()
137 // a non-zero status if the dependency is not present in the Cargo.toml in has_dependency()