Skip to content

Commit

Permalink
test: avoid gtest_discover_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddubbeldam committed Oct 14, 2024
1 parent 5106038 commit ea40cee
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 54 deletions.
23 changes: 0 additions & 23 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@
"CMAKE_CXX_FLAGS_RELEASE": "-DNDEBUG -stdlib=libc++ -fvisibility=hidden -fexperimental-library -Xclang -fopenmp -g -O3 -march=skylake-avx512 -mfma -fomit-frame-pointer -ffast-math",
"BUILD_RPM_PACKAGE": true,
"CPACK_RPM_PACKAGE_DEPENDS": "libblas3, liblapack3, libgfortran4, libquadmath0, libLLVM9, libomp9-devel, glibc, libgcc_s1, zlib",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -520,7 +519,6 @@
"CMAKE_CXX_FLAGS_RELEASE": "-DNDEBUG -stdlib=libc++ -fvisibility=hidden -fexperimental-library -Xclang -fopenmp -g -O3 -march=skylake-avx512 -mfma -fomit-frame-pointer -ffast-math",
"BUILD_RPM_PACKAGE": true,
"CPACK_RPM_PACKAGE_DEPENDS": "libblas3, liblapack3, libgfortran4, libquadmath0, libLLVM12, libomp12-devel, glibc, libgcc_s1, zlib",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -543,7 +541,6 @@
"CMAKE_CXX_FLAGS_RELEASE": "-DNDEBUG -stdlib=libc++ -fvisibility=hidden -fexperimental-library -Xclang -fopenmp -g -O3 -march=skylake-avx512 -mfma -fomit-frame-pointer -ffast-math",
"BUILD_RPM_PACKAGE": true,
"CPACK_RPM_PACKAGE_DEPENDS": "libblas3, liblapack3, libgfortran4, libquadmath0, libLLVM15, libedit0, libomp15-devel, glibc, libgcc_s1, zlib",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -566,7 +563,6 @@
"CMAKE_CXX_FLAGS_RELEASE": "-DNDEBUG -stdlib=libc++ -fvisibility=hidden -fexperimental-library -Xclang -fopenmp -g -O3 -march=skylake-avx512 -mfma -fomit-frame-pointer -ffast-math",
"BUILD_RPM_PACKAGE": true,
"CPACK_RPM_PACKAGE_DEPENDS": "libblas3, liblapack3, libgfortran4, libquadmath0, libLLVM17, libedit0, libomp17-devel, glibc, libgcc_s1, zlib",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -589,7 +585,6 @@
"CMAKE_CXX_FLAGS_RELEASE": "-DNDEBUG -stdlib=libc++ -fvisibility=hidden -fexperimental-library -Xclang -fopenmp -g -O3 -march=skylake-avx512 -mfma -fomit-frame-pointer -ffast-math",
"BUILD_RPM_PACKAGE": true,
"CPACK_RPM_PACKAGE_DEPENDS": "libhdf5_cpp103, libhdf5-103, libblas3, liblapack3, libgfortran4, libquadmath0, libLLVM17, libedit0, libomp17-devel, glibc, libgcc_s1, zlib",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -612,7 +607,6 @@
"CMAKE_CXX_FLAGS_RELEASE": "-DNDEBUG -stdlib=libc++ -fvisibility=hidden -fexperimental-library -Xclang -fopenmp -g -O3 -march=skylake-avx512 -mfma -fomit-frame-pointer -ffast-math",
"BUILD_RPM_PACKAGE": true,
"CPACK_RPM_PACKAGE_DEPENDS": "libblas3, liblapack3, libgfortran5, libquadmath0, libLLVM17, libedit0, libomp17-devel, glibc, libgcc_s1, zlib",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -635,7 +629,6 @@
"CMAKE_CXX_FLAGS_RELEASE": "-DNDEBUG -stdlib=libc++ -fvisibility=hidden -fexperimental-library -Xclang -fopenmp -g -O3 -march=skylake-avx512 -mfma -fomit-frame-pointer -ffast-math",
"BLAS_LIBRARIES": "/usr/lib64/libblas64.so.3",
"LAPACK_LIBRARIES": "/usr/lib64/liblapack64.so.3",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand Down Expand Up @@ -670,7 +663,6 @@
"OpenMP_CXX_FLAGS": "-fopenmp",
"OpenMP_CXX_LIB_NAMES": "libomp",
"OpenMP_libomp_LIBRARY": "/usr/lib/libomp.a",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand Down Expand Up @@ -707,7 +699,6 @@
"OpenMP_libomp_LIBRARY": "/usr/lib/libomp.a",
"BLAS_LIBRARIES": "/usr/lib64/libblas64.so.3",
"LAPACK_LIBRARIES": "/usr/lib64/liblapack64.so.3",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand Down Expand Up @@ -736,7 +727,6 @@
"BLAS_LIBRARIES": "/usr/lib64/libblas64_.so.3",
"LAPACK_LIBRARIES": "/usr/lib64/liblapack64_.so.3",
"Python3_EXECUTABLE": "/usr/bin/python3",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -759,7 +749,6 @@
"CMAKE_CXX_FLAGS_RELEASE": "-DNDEBUG -stdlib=libc++ -fvisibility=hidden -fexperimental-library -Xclang -fopenmp -g -O3 -march=skylake-avx512 -mfma -fomit-frame-pointer -ffast-math",
"BUILD_RPM_PACKAGE": true,
"CPACK_RPM_PACKAGE_DEPENDS": "blas64, lapack64, libgfortran, libquadmath, libomp, glibc, libgcc, zlib",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand Down Expand Up @@ -794,7 +783,6 @@
"OpenMP_CXX_LIB_NAMES": "libomp",
"OpenMP_libomp_LIBRARY": "/usr/lib/llvm-14/lib/libomp.so.5",
"BLA_SIZEOF_INTEGER": "8",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand Down Expand Up @@ -829,7 +817,6 @@
"OpenMP_CXX_LIB_NAMES": "libomp",
"OpenMP_libomp_LIBRARY": "/usr/lib/llvm-11/lib/libomp.so.5",
"BLA_SIZEOF_INTEGER": "8",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand Down Expand Up @@ -862,7 +849,6 @@
"OpenMP_CXX_FLAGS": "-fopenmp",
"OpenMP_CXX_LIB_NAMES": "libomp",
"OpenMP_libomp_LIBRARY": "/usr/lib/llvm-7/lib/libomp.so.5",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -887,7 +873,6 @@
"BUILD_DEB_PACKAGE": true,
"CPACK_DEBIAN_PACKAGE_DEPENDS": "libblas64-3, liblapack64-3 , libquadmath0, libgfortran5, libgcc-s1, libomp5, libc6, zlib1g",
"BLA_SIZEOF_INTEGER": "8",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand Down Expand Up @@ -922,7 +907,6 @@
"OpenMP_CXX_LIB_NAMES": "libomp",
"OpenMP_libomp_LIBRARY": "/usr/lib/llvm-14/lib/libomp.so.5",
"BLA_SIZEOF_INTEGER": "8",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand Down Expand Up @@ -957,7 +941,6 @@
"OpenMP_CXX_LIB_NAMES": "libomp",
"OpenMP_libomp_LIBRARY": "/usr/lib/llvm-10/lib/libomp.so.5",
"BLA_SIZEOF_INTEGER": "8",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -982,7 +965,6 @@
"BUILD_RPM_PACKAGE": true,
"CPACK_RPM_PACKAGE_DEPENDS": "blas64, lapack64, libgfortran, libquadmath, libomp, glibc, libgcc, zlib",
"BLA_SIZEOF_INTEGER": "8",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -1007,7 +989,6 @@
"BUILD_RPM_PACKAGE": true,
"CPACK_RPM_PACKAGE_DEPENDS": "blas64, lapack64, libgfortran, libquadmath, libomp, glibc, libgcc, zlib",
"BLA_SIZEOF_INTEGER": "8",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -1032,7 +1013,6 @@
"BUILD_RPM_PACKAGE": true,
"CPACK_RPM_PACKAGE_DEPENDS": "blas64, lapack64, libgfortran, libquadmath, libomp, glibc, libgcc, zlib",
"BLA_SIZEOF_INTEGER": "8",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -1057,7 +1037,6 @@
"BUILD_RPM_PACKAGE": true,
"CPACK_RPM_PACKAGE_DEPENDS": "blas64, lapack64, libgfortran, libquadmath, libomp, glibc, libgcc, zlib",
"BLA_SIZEOF_INTEGER": "8",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -1082,7 +1061,6 @@
"BUILD_RPM_PACKAGE": true,
"CPACK_RPM_PACKAGE_DEPENDS": "blas64, lapack64, libgfortran, libquadmath, libomp, glibc, libgcc, zlib",
"BLA_SIZEOF_INTEGER": "8",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand All @@ -1109,7 +1087,6 @@
"CPACK_RPM_PACKAGE_DEPENDS": "blas64, lapack64, libgfortran, libquadmath, libomp, glibc, libgcc, zlib-ng-compat",
"ZLIB_LIBRARY": "/usr/lib64/libz.a",
"BLA_SIZEOF_INTEGER": "8",
"BUILD_TESTING" : false,
"BUILD_PYTHON": true
}
},
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
</a>
<a href="https://iRASPA.github.io/RASPA3"><img alt="Documentation" src="https://img.shields.io/badge/documentation-blue">
</a>
<a href="https://github.com/iRASPA/RASPA3/actions/workflows/unit-test.yml"><img alt="Unittests" src="https://github.com/iraspa/raspa3/actions/workflows/unit-test.yml/badge.svg">
</a>
</p>

<p align="center">
Expand Down
1 change: 0 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ FetchContent_Declare(googletest
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)

include(CTest)
include(GoogleTest)

add_subdirectory(mathkit-tests)
Expand Down
6 changes: 1 addition & 5 deletions tests/foundationkit-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ if (LINUX)
OpenMP::OpenMP_CXX
GTest::gtest
GTest::gtest_main
GTest::gmock
GTest::gmock_main
-nostdlib++
-l:libc++.a
-l:libc++abi.a
Expand Down Expand Up @@ -60,8 +58,6 @@ elseif (APPLE)
${BREW_LIBAEC_DIR}/lib/libsz.a
GTest::gtest
GTest::gtest_main
GTest::gmock
GTest::gmock_main
-nostdlib++
${BREW_LLVM_DIR}/lib/c++/libc++experimental.a
${BREW_LLVM_DIR}/lib/c++/libc++.a
Expand All @@ -72,4 +68,4 @@ elseif (APPLE)
)
endif()

gtest_discover_tests(unit_tests_foundationkit)
gtest_add_tests(TARGET unit_tests_foundationkit TEST_SUFFIX .noArgs TEST_LIST noArgsTests)
6 changes: 1 addition & 5 deletions tests/mathkit-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ if (LINUX)
OpenMP::OpenMP_CXX
GTest::gtest
GTest::gtest_main
GTest::gmock
GTest::gmock_main
-nostdlib++
-l:libc++.a
-l:libc++abi.a
Expand Down Expand Up @@ -59,8 +57,6 @@ elseif (APPLE)
${BREW_LIBAEC_DIR}/lib/libsz.a
GTest::gtest
GTest::gtest_main
GTest::gmock
GTest::gmock_main
-nostdlib++
${BREW_LLVM_DIR}/lib/c++/libc++experimental.a
${BREW_LLVM_DIR}/lib/c++/libc++.a
Expand All @@ -71,4 +67,4 @@ elseif (APPLE)
)
endif()

gtest_discover_tests(unit_tests_mathkit)
gtest_add_tests(TARGET unit_tests_mathkit TEST_SUFFIX .noArgs TEST_LIST noArgsTests)
7 changes: 2 additions & 5 deletions tests/raspakit-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ if (LINUX)
OpenMP::OpenMP_CXX
GTest::gtest
GTest::gtest_main
GTest::gmock
GTest::gmock_main
-nostdlib++
-l:libc++.a
-l:libc++abi.a
Expand Down Expand Up @@ -78,8 +76,6 @@ elseif (APPLE)
${BREW_LIBAEC_DIR}/lib/libsz.a
GTest::gtest
GTest::gtest_main
GTest::gmock
GTest::gmock_main
-nostdlib++
${BREW_LLVM_DIR}/lib/c++/libc++experimental.a
${BREW_LLVM_DIR}/lib/c++/libc++.a
Expand All @@ -90,12 +86,13 @@ elseif (APPLE)
)
endif()

gtest_discover_tests(unit_tests_raspakit)
gtest_add_tests(TARGET unit_tests_raspakit TEST_SUFFIX .noArgs TEST_LIST noArgsTests)

if(BUILD_MAC_PACKAGE)
install(CODE "execute_process(COMMAND
codesign --force --options runtime --timestamp --sign \"Developer ID Application: David Dubbeldam (24U2ZRZ6SC)\"
\"tests/raspakit-tests/unit_tests_raspakit\")" COMPONENT unit_tests_raspakit)
endif()

install(TARGETS unit_tests_raspakit DESTINATION share/raspa3/tests COMPONENT unit_tests_raspakit)

8 changes: 1 addition & 7 deletions tests/symmetrykit-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ add_executable(unit_tests_symmetrykit
find_smallest_primitive_cell_no_partial_occupancies.cpp
find_pointgroup.cpp
find_pointgroup_no_partial_occupancies.cpp
find_pointgroup_no_partial_occupancies.cpp
find_spacegroup.cpp
find_spacegroup_no_partial_occupancies.cpp
main.cpp)

if (LINUX)
Expand All @@ -20,8 +18,6 @@ if (LINUX)
OpenMP::OpenMP_CXX
GTest::gtest
GTest::gtest_main
GTest::gmock
GTest::gmock_main
-nostdlib++
-l:libc++.a
-l:libc++abi.a
Expand Down Expand Up @@ -66,8 +62,6 @@ elseif (APPLE)
${BREW_LIBAEC_DIR}/lib/libsz.a
GTest::gtest
GTest::gtest_main
GTest::gmock
GTest::gmock_main
-nostdlib++
${BREW_LLVM_DIR}/lib/c++/libc++experimental.a
${BREW_LLVM_DIR}/lib/c++/libc++.a
Expand All @@ -82,4 +76,4 @@ endif()

file(COPY spglibtestdata DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

gtest_discover_tests(unit_tests_symmetrykit)
gtest_add_tests(TARGET unit_tests_symmetrykit TEST_LIST noArgsTests)
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import sksymmetrycell;
import skspacegroup;
import skpointgroup;

TEST(FindPointgroupNoPartialOccupancies, Triclinic)
TEST(FindPointgroupNoPartialOccupancies, Test_Triclinic)
{
std::random_device rd;
std::mt19937_64 mt(rd());
Expand Down Expand Up @@ -64,7 +64,7 @@ TEST(FindPointgroupNoPartialOccupancies, Triclinic)
}
}

TEST(FindPointgroupNoPartialOccupancies, Monoclinic)
TEST(FindPointgroupNoPartialOccupancies, Test_Monoclinic)
{
std::random_device rd;
std::mt19937_64 mt(rd());
Expand Down Expand Up @@ -133,7 +133,7 @@ TEST(FindPointgroupNoPartialOccupancies, Monoclinic)
}
}

TEST(FindPointgroupNoPartialOccupancies, Orthogonal)
TEST(FindPointgroupNoPartialOccupancies, Test_Orthogonal)
{
std::random_device rd;
std::mt19937_64 mt(rd());
Expand Down Expand Up @@ -296,7 +296,7 @@ TEST(FindPointgroupNoPartialOccupancies, Orthogonal)
}
}

TEST(FindPointgroupNoPartialOccupancies, Tetragonal)
TEST(FindPointgroupNoPartialOccupancies, Test_Tetragonal)
{
std::random_device rd;
std::mt19937_64 mt(rd());
Expand Down Expand Up @@ -482,7 +482,7 @@ TEST(FindPointgroupNoPartialOccupancies, Tetragonal)
}
}

TEST(FindPointgroupNoPartialOccupancies, Trigonal)
TEST(FindPointgroupNoPartialOccupancies, Test_Trigonal)
{
std::random_device rd;
std::mt19937_64 mt(rd());
Expand Down Expand Up @@ -574,7 +574,7 @@ TEST(FindPointgroupNoPartialOccupancies, Trigonal)
}
}

TEST(FindPointgroupNoPartialOccupancies, Hexagonal)
TEST(FindPointgroupNoPartialOccupancies, Test_Hexagonal)
{
std::random_device rd;
std::mt19937_64 mt(rd());
Expand Down Expand Up @@ -664,7 +664,7 @@ TEST(FindPointgroupNoPartialOccupancies, Hexagonal)
}
}

TEST(FindPointgroupNoPartialOccupancies, Cubic)
TEST(FindPointgroupNoPartialOccupancies, Test_Cubic)
{
std::random_device rd;
std::mt19937_64 mt(rd());
Expand Down Expand Up @@ -738,7 +738,7 @@ TEST(FindPointgroupNoPartialOccupancies, Cubic)
}
}

TEST(FindPointgroupNoPartialOccupancies, Virtual)
TEST(FindPointgroupNoPartialOccupancies, Test_Virtual)
{
std::random_device rd;
std::mt19937_64 mt(rd());
Expand Down

0 comments on commit ea40cee

Please sign in to comment.