Skip to content

Commit 1725273

Browse files
committed
Rename the ctest file from main to ctest
Make it more obvious what this test is about. (backport <#4625>) (cherry picked from commit fef089c)
1 parent e9b021b commit 1725273

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

ci/create-artifacts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515

1616
def main():
17-
# Find the most recently touched file named "main.c" in the target
17+
# Find the most recently touched file named "ctest_output.c" in the target
1818
# directory. This will be libc-tests's `OUT_DIR`
19-
marker_files = [Path(p) for p in glob("target/**/main.c", recursive=True)]
19+
marker_files = [Path(p) for p in glob("target/**/ctest_output.c", recursive=True)]
2020
marker_files.sort(key=lambda path: path.stat().st_mtime)
2121
build_dir = marker_files[0].parent
2222
print(f"Located build directory '{build_dir}'")

libc-test/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ align = ["libc/align"]
3131
extra_traits = ["libc/extra_traits"]
3232

3333
[[test]]
34-
name = "main"
35-
path = "test/main.rs"
34+
name = "ctest"
35+
path = "test/ctest.rs"
3636
harness = false
3737

3838
[[test]]

libc-test/build.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ fn test_apple(target: &str) {
504504
"uuid_t" | "vol_capabilities_set_t" => true,
505505
_ => false,
506506
});
507-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
507+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
508508
}
509509

510510
fn test_openbsd(target: &str) {
@@ -694,7 +694,7 @@ fn test_openbsd(target: &str) {
694694
}
695695
});
696696

697-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
697+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
698698
}
699699

700700
fn test_cygwin(target: &str) {
@@ -866,7 +866,7 @@ fn test_cygwin(target: &str) {
866866
}
867867
});
868868

869-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
869+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
870870
}
871871

872872
fn test_windows(target: &str) {
@@ -995,7 +995,7 @@ fn test_windows(target: &str) {
995995
}
996996
});
997997

998-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
998+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
999999
}
10001000

10011001
fn test_redox(target: &str) {
@@ -1045,7 +1045,7 @@ fn test_redox(target: &str) {
10451045
"wchar.h",
10461046
}
10471047

1048-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
1048+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
10491049
}
10501050

10511051
fn test_solarish(target: &str) {
@@ -1335,7 +1335,7 @@ fn test_solarish(target: &str) {
13351335
}
13361336
});
13371337

1338-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
1338+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
13391339
}
13401340

13411341
fn test_netbsd(target: &str) {
@@ -1551,7 +1551,7 @@ fn test_netbsd(target: &str) {
15511551
}
15521552
});
15531553

1554-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
1554+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
15551555
}
15561556

15571557
fn test_dragonflybsd(target: &str) {
@@ -1776,7 +1776,7 @@ fn test_dragonflybsd(target: &str) {
17761776
(struct_ == "sigevent" && field == "sigev_notify_thread_id")
17771777
});
17781778

1779-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
1779+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
17801780
}
17811781

17821782
fn test_wasi(target: &str) {
@@ -1883,7 +1883,7 @@ fn test_wasi(target: &str) {
18831883
// doesn't support sizeof.
18841884
cfg.skip_field(|s, field| s == "dirent" && field == "d_name");
18851885

1886-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
1886+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
18871887
}
18881888

18891889
fn test_android(target: &str) {
@@ -2390,7 +2390,7 @@ fn test_android(target: &str) {
23902390
}
23912391
});
23922392

2393-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
2393+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
23942394

23952395
test_linux_like_apis(target);
23962396
}
@@ -3079,7 +3079,7 @@ fn test_freebsd(target: &str) {
30793079
});
30803080
}
30813081

3082-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
3082+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
30833083
}
30843084

30853085
fn test_emscripten(target: &str) {
@@ -3319,7 +3319,7 @@ fn test_emscripten(target: &str) {
33193319
].contains(&field))
33203320
});
33213321

3322-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
3322+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
33233323
}
33243324

33253325
fn test_neutrino(target: &str) {
@@ -3592,7 +3592,7 @@ fn test_neutrino(target: &str) {
35923592

35933593
cfg.skip_static(move |name| name == "__dso_handle");
35943594

3595-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
3595+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
35963596
}
35973597

35983598
fn test_vxworks(target: &str) {
@@ -3698,7 +3698,7 @@ fn test_vxworks(target: &str) {
36983698
_ => false,
36993699
});
37003700

3701-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
3701+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
37023702
}
37033703

37043704
fn config_gnu_bits(target: &str, cfg: &mut ctest::TestGenerator) {
@@ -5019,7 +5019,7 @@ fn test_linux(target: &str) {
50195019
_ => false,
50205020
});
50215021

5022-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
5022+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
50235023

50245024
test_linux_like_apis(target);
50255025
}
@@ -5537,7 +5537,7 @@ fn test_haiku(target: &str) {
55375537
s => s.to_string(),
55385538
}
55395539
});
5540-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
5540+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
55415541
}
55425542

55435543
fn test_aix(target: &str) {
@@ -5834,5 +5834,5 @@ fn test_aix(target: &str) {
58345834
}
58355835
});
58365836

5837-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
5837+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
58385838
}

libc-test/test/main.rs renamed to libc-test/test/ctest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
use libc::*;
44

5-
include!(concat!(env!("OUT_DIR"), "/main.rs"));
5+
include!(concat!(env!("OUT_DIR"), "/ctest_output.rs"));

0 commit comments

Comments
 (0)