Skip to content

Commit f5baf6d

Browse files
committed
Rename the ctest file from main to ctest
Make it more obvious what this test is about.
1 parent d21f619 commit f5baf6d

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
@@ -29,8 +29,8 @@ std = ["libc/std"]
2929
extra_traits = ["libc/extra_traits"]
3030

3131
[[test]]
32-
name = "main"
33-
path = "test/main.rs"
32+
name = "ctest"
33+
path = "test/ctest.rs"
3434
harness = false
3535

3636
[[test]]

libc-test/build.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ fn test_apple(target: &str) {
480480
"uuid_t" | "vol_capabilities_set_t" => true,
481481
_ => false,
482482
});
483-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
483+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
484484
}
485485

486486
fn test_openbsd(target: &str) {
@@ -648,7 +648,7 @@ fn test_openbsd(target: &str) {
648648
}
649649
});
650650

651-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
651+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
652652
}
653653

654654
fn test_cygwin(target: &str) {
@@ -820,7 +820,7 @@ fn test_cygwin(target: &str) {
820820
}
821821
});
822822

823-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
823+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
824824
}
825825

826826
fn test_windows(target: &str) {
@@ -942,7 +942,7 @@ fn test_windows(target: &str) {
942942

943943
cfg.skip_fn(|_| false);
944944

945-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
945+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
946946
}
947947

948948
fn test_redox(target: &str) {
@@ -992,7 +992,7 @@ fn test_redox(target: &str) {
992992
"wchar.h",
993993
}
994994

995-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
995+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
996996
}
997997

998998
fn test_solarish(target: &str) {
@@ -1279,7 +1279,7 @@ fn test_solarish(target: &str) {
12791279
}
12801280
});
12811281

1282-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
1282+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
12831283
}
12841284

12851285
fn test_netbsd(target: &str) {
@@ -1493,7 +1493,7 @@ fn test_netbsd(target: &str) {
14931493
}
14941494
});
14951495

1496-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
1496+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
14971497
}
14981498

14991499
fn test_dragonflybsd(target: &str) {
@@ -1715,7 +1715,7 @@ fn test_dragonflybsd(target: &str) {
17151715
(struct_ == "sigevent" && field == "sigev_notify_thread_id")
17161716
});
17171717

1718-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
1718+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
17191719
}
17201720

17211721
fn test_wasi(target: &str) {
@@ -1822,7 +1822,7 @@ fn test_wasi(target: &str) {
18221822
// doesn't support sizeof.
18231823
cfg.skip_field(|s, field| s == "dirent" && field == "d_name");
18241824

1825-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
1825+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
18261826
}
18271827

18281828
fn test_android(target: &str) {
@@ -2332,7 +2332,7 @@ fn test_android(target: &str) {
23322332
}
23332333
});
23342334

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

23372337
test_linux_like_apis(target);
23382338
}
@@ -3000,7 +3000,7 @@ fn test_freebsd(target: &str) {
30003000
});
30013001
}
30023002

3003-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
3003+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
30043004
}
30053005

30063006
fn test_emscripten(target: &str) {
@@ -3245,7 +3245,7 @@ fn test_emscripten(target: &str) {
32453245
].contains(&field))
32463246
});
32473247

3248-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
3248+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
32493249
}
32503250

32513251
fn test_neutrino(target: &str) {
@@ -3515,7 +3515,7 @@ fn test_neutrino(target: &str) {
35153515

35163516
cfg.skip_static(move |name| name == "__dso_handle");
35173517

3518-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
3518+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
35193519
}
35203520

35213521
fn test_vxworks(target: &str) {
@@ -3621,7 +3621,7 @@ fn test_vxworks(target: &str) {
36213621
_ => false,
36223622
});
36233623

3624-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
3624+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
36253625
}
36263626

36273627
fn config_gnu_bits(target: &str, cfg: &mut ctest::TestGenerator) {
@@ -4941,7 +4941,7 @@ fn test_linux(target: &str) {
49414941
_ => false,
49424942
});
49434943

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

49464946
test_linux_like_apis(target);
49474947
}
@@ -5457,7 +5457,7 @@ fn test_haiku(target: &str) {
54575457
s => s.to_string(),
54585458
}
54595459
});
5460-
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
5460+
cfg.generate(src_hotfix_dir().join("lib.rs"), "ctest_output.rs");
54615461
}
54625462

54635463
fn test_aix(target: &str) {
@@ -5754,5 +5754,5 @@ fn test_aix(target: &str) {
57545754
}
57555755
});
57565756

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

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)