Skip to content

Commit f9d8b9c

Browse files
authored
test: move serial_tests to nextest test groups (#10392)
1 parent 7ed7e16 commit f9d8b9c

File tree

4 files changed

+7
-37
lines changed

4 files changed

+7
-37
lines changed

.config/nextest.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[test-groups]
2+
chisel-serial = { max-threads = 1 }
3+
14
[profile.default]
25
retries = { backoff = "exponential", count = 2, delay = "3s", jitter = true }
36
slow-timeout = { period = "1m", terminate-after = 3 }
@@ -9,3 +12,7 @@ slow-timeout = { period = "5m", terminate-after = 4 }
912
[[profile.default.overrides]]
1013
filter = "package(foundry-cheatcodes-spec)"
1114
retries = 0
15+
16+
[[profile.default.overrides]]
17+
filter = "package(chisel)"
18+
test-group = "chisel-serial"

Cargo.lock

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

crates/chisel/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ walkdir.workspace = true
6161
tikv-jemallocator = { workspace = true, optional = true }
6262

6363
[dev-dependencies]
64-
serial_test = "3"
6564
tracing-subscriber.workspace = true
6665

6766
[features]

crates/chisel/tests/cache.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
use chisel::session::ChiselSession;
22
use foundry_compilers::artifacts::EvmVersion;
33
use foundry_config::Config;
4-
use serial_test::serial;
54
use std::path::Path;
65

76
#[test]
8-
#[serial]
97
fn test_cache_directory() {
108
// Get the cache dir
119
// Should be ~/.foundry/cache/chisel
@@ -17,7 +15,6 @@ fn test_cache_directory() {
1715
}
1816

1917
#[test]
20-
#[serial]
2118
fn test_create_cache_directory() {
2219
// Get the cache dir
2320
let cache_dir = ChiselSession::cache_dir().unwrap();
@@ -30,7 +27,6 @@ fn test_create_cache_directory() {
3027
}
3128

3229
#[test]
33-
#[serial]
3430
fn test_write_session() {
3531
// Create the cache directory if it doesn't exist
3632
let cache_dir = ChiselSession::cache_dir().unwrap();
@@ -58,7 +54,6 @@ fn test_write_session() {
5854
}
5955

6056
#[test]
61-
#[serial]
6257
fn test_write_session_with_name() {
6358
// Create the cache directory if it doesn't exist
6459
let cache_dir = ChiselSession::cache_dir().unwrap();
@@ -83,7 +78,6 @@ fn test_write_session_with_name() {
8378
}
8479

8580
#[test]
86-
#[serial]
8781
fn test_clear_cache() {
8882
// Create a session to validate clearing a non-empty cache directory
8983
let cache_dir = ChiselSession::cache_dir().unwrap();
@@ -108,7 +102,6 @@ fn test_clear_cache() {
108102
}
109103

110104
#[test]
111-
#[serial]
112105
fn test_list_sessions() {
113106
// Create and clear the cache directory
114107
ChiselSession::create_cache_dir().unwrap();
@@ -135,7 +128,6 @@ fn test_list_sessions() {
135128
}
136129

137130
#[test]
138-
#[serial]
139131
fn test_load_cache() {
140132
// Create and clear the cache directory
141133
ChiselSession::create_cache_dir().unwrap();
@@ -163,7 +155,6 @@ fn test_load_cache() {
163155
}
164156

165157
#[test]
166-
#[serial]
167158
fn test_write_same_session_multiple_times() {
168159
// Create and clear the cache directory
169160
ChiselSession::create_cache_dir().unwrap();
@@ -186,7 +177,6 @@ fn test_write_same_session_multiple_times() {
186177
}
187178

188179
#[test]
189-
#[serial]
190180
fn test_load_latest_cache() {
191181
// Create and clear the cache directory
192182
ChiselSession::create_cache_dir().unwrap();

0 commit comments

Comments
 (0)