Skip to content

Commit 20cca22

Browse files
committed
Add ctest and ctest-test to the root workspace
Now that the structure has been cleaned up, it is possible to add these crates to the workspace. Since these now get tested in CI by default, some adjustment of the test script is needed to skip relevant platforms. `libc-test` depends on `ctest` from crates.io and `ctest-test` depends on `libc` with a local download. As part of this change, adjust both cases to use local paths.
1 parent adadc17 commit 20cca22

File tree

5 files changed

+20
-11
lines changed

5 files changed

+20
-11
lines changed

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,8 @@ rustc-dep-of-std = ["rustc-std-workspace-core"]
140140
extra_traits = []
141141

142142
[workspace]
143-
members = ["libc-test"]
143+
members = [
144+
"ctest",
145+
"ctest-test",
146+
"libc-test",
147+
]

ci/run.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,19 @@ case "$target" in
9393
*) cmd="$cmd --workspace"
9494
esac
9595

96+
# garando_errors only compiles on `cfg(any(unix, windows))`
97+
case "$target" in
98+
*wasm*) cmd="$cmd --exclude ctest --exclude ctest-test"
99+
esac
100+
101+
# # FIXME(ctest): duplicate symbol errors for statics, e.g. T1_static_mut_u8, on Unix-
102+
# # like platforms.
103+
# cast "$(uname -s)" in
104+
# *windows*msvc) ;;
105+
# *apple*) ;;
106+
# *) cmd="$cmd --exclude ctest-test" ;;
107+
# esca
108+
96109
if [ "$target" = "s390x-unknown-linux-gnu" ]; then
97110
# FIXME: s390x-unknown-linux-gnu often fails to test due to timeout,
98111
# so we retry this N times.

ctest-test/Cargo.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ cc = "1.0"
1212

1313
[dependencies]
1414
cfg-if = "1.0.0"
15-
libc = "0.2"
16-
17-
[lib]
18-
name = "testcrate"
19-
test = false
20-
doctest = false
15+
libc = { path = ".." }
2116

2217
[[bin]]
2318
name = "t1"

libc-test/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ annotate-snippets = { version = "0.11.5", features = ["testing-colors"] }
2424

2525
[build-dependencies]
2626
cc = "1.0.83"
27-
# FIXME: Use fork ctest until the maintainer gets back.
28-
ctest2 = "0.4.3"
27+
ctest = { path = "../ctest" }
2928
regex = "1.11.1"
3029

3130
[features]

libc-test/build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#![deny(warnings)]
22

3-
extern crate ctest2 as ctest;
4-
53
use std::fs::File;
64
use std::io::{BufRead, BufReader, BufWriter, Write};
75
use std::path::{Path, PathBuf};

0 commit comments

Comments
 (0)