Skip to content

Commit 18fdc8c

Browse files
committed
ignore const generic test because it needs a compiler flag
1 parent 004f72a commit 18fdc8c

File tree

2 files changed

+11
-2
lines changed
  • sway-lsp/tests
  • test/src/e2e_vm_tests/test_programs/should_pass/language/const_generics/src

2 files changed

+11
-2
lines changed

sway-lsp/tests/lib.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2410,15 +2410,23 @@ fn run_garbage_collection_tests_from_projects_dir(projects_dir: PathBuf) -> Resu
24102410
.unwrap()
24112411
.filter_map(|e| e.ok())
24122412
.filter(|e| e.file_type().map(|ft| ft.is_dir()).unwrap_or(false))
2413-
.map(|dir_entry| {
2413+
.filter_map(|dir_entry| {
24142414
let project_dir = dir_entry.path();
24152415
let project_name = project_dir
24162416
.file_name()
24172417
.unwrap()
24182418
.to_string_lossy()
24192419
.to_string();
24202420
let main_file = project_dir.join("src/main.sw");
2421-
(project_name, main_file)
2421+
2422+
// check if this test must be ignored
2423+
let contents = std::fs::read_to_string(&main_file)
2424+
.map(|x| x.contains("ignore garbage_collection_all_language_tests"));
2425+
if let Ok(true) = contents {
2426+
None
2427+
} else {
2428+
Some((project_name, main_file))
2429+
}
24222430
})
24232431
.filter(|(_, main_file)| main_file.exists())
24242432
.collect();

test/src/e2e_vm_tests/test_programs/should_pass/language/const_generics/src/main.sw

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// ignore garbage_collection_all_language_tests - needs a experimental feature
12
script;
23

34
struct C {}

0 commit comments

Comments
 (0)