skip running GPU test if there is no viable GPU device

This commit is contained in:
Axel Kohlmeyer
2021-05-10 17:11:48 -04:00
parent 1ae21f46ab
commit 883d55f416

View File

@ -778,6 +778,7 @@ TEST(PairStyle, omp)
TEST(PairStyle, gpu)
{
if (!LAMMPS::is_installed_pkg("GPU")) GTEST_SKIP();
if (!Info::has_gpu_device()) GTEST_SKIP();
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
const char *args_neigh[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite", "-sf", "gpu"};