Skip to content

Commit

Permalink
ignore empty experimental directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kobe63 committed Nov 14, 2023
1 parent c93f43f commit 3cc2154
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,14 @@ fn create_tests_module() -> String {
"//TEST_FUNCTIONS_STABLE",
&create_test_functions("./tests/jsons/stable", TestType::Stable),
);
tests_mod = tests_mod.replace(
"//TEST_FUNCTIONS_EXPERIMENTAL",
&create_test_functions("./tests/jsons/experimental", TestType::Experimental),
);
let experimental_testdir = "./tests/jsons/experimental";
if std::fs::read_dir(experimental_testdir).is_ok_and(|dir| dir.count() > 0) {
//ignore empty experimental directory
tests_mod = tests_mod.replace(
"//TEST_FUNCTIONS_EXPERIMENTAL",
&create_test_functions(experimental_testdir, TestType::Experimental),
);
}

tests_mod
}
Expand Down

0 comments on commit 3cc2154

Please sign in to comment.