allow skipping fix timestep tests when LAMMPS was compiled for static libs

This commit is contained in:
Axel Kohlmeyer
2021-09-08 23:41:31 -04:00
parent 8c3924352d
commit 4e92c68244
3 changed files with 11 additions and 1 deletions

View File

@ -117,6 +117,9 @@ endforeach()
# tester for timestepping fixes
add_executable(test_fix_timestep test_fix_timestep.cpp)
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(test_fix_timestep -DUSING_STATIC_LIBS=1)
endif()
target_link_libraries(test_fix_timestep PRIVATE lammps style_tests)
# tests for timestep related fixes (time integration, thermostat, force manipulation, constraints/restraints)

View File

@ -255,6 +255,9 @@ TEST(FixTimestep, plain)
{
if (!LAMMPS::is_installed_pkg("MOLECULE")) GTEST_SKIP();
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
#if defined(USING_STATIC_LIBS)
if (test_config.skip_tests.count("static")) GTEST_SKIP();
#endif
const char *args[] = {"FixTimestep", "-log", "none", "-echo", "screen", "-nocite"};
@ -703,6 +706,9 @@ TEST(FixTimestep, omp)
if (!LAMMPS::is_installed_pkg("OPENMP")) GTEST_SKIP();
if (!LAMMPS::is_installed_pkg("MOLECULE")) GTEST_SKIP();
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
#if defined(USING_STATIC_LIBS)
if (test_config.skip_tests.count("static")) GTEST_SKIP();
#endif
const char *args[] = {"FixTimestep", "-log", "none", "-echo", "screen", "-nocite",
"-pk", "omp", "4", "-sf", "omp"};

View File

@ -1,6 +1,7 @@
---
lammps_version: 10 Mar 2021
date_generated: Wed Mar 24 18:57:26 202
date_generated: Wed Mar 24 18:57:26 2021
skip_tests: static
epsilon: 9e-12
prerequisites: ! |
atom full