add new key to YAML files: skip_tests
This commit is contained in:
@ -204,6 +204,14 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
// epsilon
|
||||
writer.emit("epsilon", config.epsilon);
|
||||
|
||||
// skip tests
|
||||
block.clear();
|
||||
for (auto &skip_tests : config.skip_tests) {
|
||||
if (block.empty()) block = skip_tests;
|
||||
else block += " " + skip_tests;
|
||||
}
|
||||
writer.emit("skip_tests", block);
|
||||
|
||||
// prerequisites
|
||||
block.clear();
|
||||
for (auto &prerequisite : config.prerequisites) {
|
||||
@ -287,6 +295,8 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
||||
TEST(FixTimestep, plain)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("MOLECULE")) GTEST_SKIP();
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"FixTimestep", "-log", "none", "-echo", "screen", "-nocite"};
|
||||
|
||||
char **argv = (char **)args;
|
||||
@ -729,6 +739,8 @@ TEST(FixTimestep, omp)
|
||||
{
|
||||
if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
|
||||
if (!LAMMPS::is_installed_pkg("MOLECULE")) GTEST_SKIP();
|
||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||
|
||||
const char *args[] = {"FixTimestep", "-log", "none", "-echo", "screen", "-nocite",
|
||||
"-pk", "omp", "4", "-sf", "omp"};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user