MetOffice / MetOffice/Vernier

Issues with testing

Open
#149 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6
Forks
11
Avg merge
18h 7m
Merged PRs (30d)
1

Description

When running cmake without disabling testing, I get some strange timeout problems:
```
[ 56%] Linking CXX executable test_hashtable
/usr/bin/cmake: /home/joerg/work/spack/var/spack/environments/lfric-v0/.spack-env/view/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /home/joerg/work/spack/var/spack/environments/lfric-v0/.spack-env/view/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
CMake Error at /usr/share/cmake-3.22/Modules/GoogleTestAddTests.cmake:83 (message):
Error running test executable.

Path: '/home/joerg/work/vernier/xx/tests/unit_tests/c++/test_profiler'
Result: Process terminated due to timeout
Output:

Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/GoogleTestAddTests.cmake:179 (gtest_discover_tests_impl)

make[2]: *** [tests/unit_tests/c++/CMakeFiles/test_profiler.dir/build.make:122: tests/unit_tests/c++/test_profiler] Error 1
make[2]: *** Deleting file 'tests/unit_tests/c++/test_profiler'
make[1]: *** [CMakeFiles/Makefile2:283: tests/unit_tests/c++/CMakeFiles/test_profiler.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
CMake Error at /usr/share/cmake-3.22/Modules/GoogleTestAddTests.cmake:83 (message):
Error running test executable.

Path: '/home/joerg/work/vernier/xx/tests/unit_tests/c++/test_hashtiming'
Result: Process terminated due to timeout
Output:

Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/GoogleTestAddTests.cmake:179 (gtest_discover_tests_impl)

make[2]: *** [tests/unit_tests/c++/CMakeFiles/test_hashtiming.dir/build.make:122: tests/unit_tests/c++/test_hashtiming] Error 1
make[2]: *** Deleting file 'tests/unit_tests/c++/test_hashtiming'
make[1]: *** [CMakeFiles/Makefile2:309: tests/unit_tests/c++/CMakeFiles/test_hashtiming.dir/all] Error 2
CMake Error at /usr/share/cmake-3.22/Modules/GoogleTestAddTests.cmake:83 (message):
Error running test executable.

Path: '/home/joerg/work/vernier/xx/tests/unit_tests/c++/test_regionname'
Result: Process terminated due to timeout
Output:

Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/GoogleTestAddTests.cmake:179 (gtest_discover_tests_impl)

make[2]: *** [tests/unit_tests/c++/CMakeFiles/test_regionname.dir/build.make:122: tests/unit_tests/c++/test_regionname] Error 1
make[2]: *** Deleting file 'tests/unit_tests/c++/test_regionname'
make[1]: *** [CMakeFiles/Makefile2:335: tests/unit_tests/c++/CMakeFiles/test_regionname.dir/all] Error 2
CMake Error at /usr/share/cmake-3.22/Modules/GoogleTestAddTests.cmake:83 (message):
Error running test executable.

Path: '/home/joerg/work/vernier/xx/tests/unit_tests/c++/test_hashtable'
Result: Process terminated due to timeout
Output:

Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/GoogleTestAddTests.cmake:179 (gtest_discover_tests_impl)

make[2]: *** [tests/unit_tests/c++/CMakeFiles/test_hashtable.dir/build.make:122: tests/unit_tests/c++/test_hashtable] Error 1
make[2]: *** Deleting file 'tests/unit_tests/c++/test_hashtable'
make[1]: *** [CMakeFiles/Makefile2:361: tests/unit_tests/c++/CMakeFiles/test_hashtable.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
```

I added googletest using spack (version 1.12.1). I then disabled testing in cmake, and it compiled.

No urgency from me to find the root cause, I don't need testing - I just thought to make you aware of this :)

It might be nicer if the default would be to disable tests, which also reduces dependencies - since as a user this is probably not required(?)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the CMake build with testing enabled and inspect GoogleTest discovery for tests/unit_tests/c++/test_profiler, test_hashtiming, test_regionname, and test_hashtable. Determine why discovery times out and whether the intended outcome is fixing that failure or changing the default testing configuration; completion should include a reproducible validation of the chosen behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.