Skip to content

Commit 4ca90a8

Browse files
committed
Support proc macro test dependencies
1 parent 2a0d334 commit 4ca90a8

File tree

6 files changed

+28
-6
lines changed

6 files changed

+28
-6
lines changed

src/dependencies.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,12 @@ pub(crate) fn build_dependencies(config: &Config) -> Result<Dependencies> {
108108
continue;
109109
}
110110
// Check that we only collect rmeta and rlib crates, not build script crates
111-
if artifact
112-
.filenames
113-
.iter()
114-
.any(|f| !matches!(f.extension(), Some("rlib" | "rmeta")))
115-
{
111+
if artifact.filenames.iter().any(|f| {
112+
!matches!(
113+
f.extension(),
114+
Some("rlib" | "rmeta" | "so" | "dylib" | "dll")
115+
)
116+
}) {
116117
continue;
117118
}
118119
for filename in &artifact.filenames {

tests/integrations/basic/Cargo.lock

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

tests/integrations/basic/Cargo.stdout

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Building aux file tests/actual_tests/auxiliary/derive_proc_macro.rs ... ok
1313
tests/actual_tests/aux_derive.rs ... ok
1414
Building aux file tests/actual_tests/auxiliary/the_proc_macro.rs ... ok
1515
tests/actual_tests/aux_proc_macro.rs ... ok
16+
tests/actual_tests/dep_derive.rs ... ok
1617
tests/actual_tests/error_above.rs ... ok
1718
tests/actual_tests/executable.rs ... ok
1819
tests/actual_tests/foomp-rustfix.rs ... ok
@@ -28,7 +29,7 @@ tests/actual_tests/unicode.rs ... ok
2829
tests/actual_tests/windows_paths.rs ... ok
2930
tests/actual_tests/subdir/aux_proc_macro.rs ... ok
3031

31-
test result: ok. 16 passed;
32+
test result: ok. 17 passed;
3233

3334

3435
running 0 tests

tests/integrations/basic/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

8+
[dependencies]
9+
serde_derive = "1.0"
10+
811
[dev-dependencies]
912
ui_test = { path = "../../.."}
1013
tempfile = "3.3.0"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//@run
2+
3+
#[macro_use]
4+
extern crate serde_derive;
5+
6+
fn main() {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
warning: unused `#[macro_use]` import
2+
--> tests/actual_tests/dep_derive.rs:3:1
3+
|
4+
3 | #[macro_use]
5+
| ^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(unused_imports)]` on by default
8+
9+
warning: 1 warning emitted
10+

0 commit comments

Comments
 (0)