Skip to content

Commit 97d388c

Browse files
committed
test: Use automatic test detection
Move from `test/` to `tests/`, which is the directory for autodetection. This means that we can drop `[[test]]` entries in `libc-test/Cargo.toml` that don't require nondefault configuration like `harness = false`. The style library had to be moved to `style_lib` so that `style` could be used as the test name. (backport <#4569>) (cherry picked from commit eab4196)
1 parent 3f52956 commit 97d388c

File tree

13 files changed

+10
-28
lines changed

13 files changed

+10
-28
lines changed

libc-test/Cargo.toml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,54 +32,36 @@ extra_traits = ["libc/extra_traits"]
3232

3333
[[test]]
3434
name = "ctest"
35-
path = "test/ctest.rs"
3635
harness = false
3736

3837
[[test]]
39-
name = "linux-fcntl"
40-
path = "test/linux_fcntl.rs"
38+
name = "linux_fcntl"
4139
harness = false
4240

4341
[[test]]
44-
name = "linux-if-arp"
45-
path = "test/linux_if_arp.rs"
42+
name = "linux_if_arp"
4643
harness = false
4744

4845
[[test]]
49-
name = "linux-ipv6"
50-
path = "test/linux_ipv6.rs"
46+
name = "linux_ipv6"
5147
harness = false
5248

5349
[[test]]
54-
name = "linux-elf"
55-
path = "test/linux_elf.rs"
50+
name = "linux_elf"
5651
harness = false
5752

5853
[[test]]
59-
name = "linux-strerror_r"
60-
path = "test/linux_strerror_r.rs"
54+
name = "linux_strerror_r"
6155
harness = false
6256

6357
[[test]]
64-
name = "linux-termios"
65-
path = "test/linux_termios.rs"
58+
name = "linux_termios"
6659
harness = false
6760

6861
[[test]]
6962
name = "semver"
70-
path = "test/semver.rs"
7163
harness = false
7264

73-
[[test]]
74-
name = "style"
75-
path = "test/check_style.rs"
76-
harness = true
77-
78-
[[test]]
79-
name = "style_tests"
80-
path = "test/style_tests.rs"
81-
harness = true
82-
8365
# FIXME(msrv): These should be moved to the root Cargo.toml as `[workspace.lints.*]`
8466
# once MSRV is above 1.64 and replaced with `[lints] workspace=true`
8567

0 commit comments

Comments
 (0)