root
root copied to clipboard
System gtest
This Pull request:
Changes or fixes:
Implement builtin_gtest option
By setting the option to OFF the system gtest and gmock are used. This allows doing tests without network available, e.g. during a package build for Fedora/EPEL.
Checklist:
- [x] tested changes locally
- [ ] updated the docs (if necessary)
Starting build on ROOT-debian10-i386
/cxx14
, ROOT-performance-centos8-multicore
/default
, ROOT-ubuntu16
/nortcxxmod
, ROOT-ubuntu2004
/soversion
, mac1015
/python3
, mac11
/cxx17
, windows10
/cxx14
How to customize builds
Build failed on ROOT-debian10-i386/cxx14. Running on pcepsft11.dyndns.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-04T07:48:18.774Z] CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
- [2022-04-04T07:48:18.774Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
Build failed on ROOT-ubuntu16/nortcxxmod. Running on sft-ubuntu-1604-2.cern.ch:/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-04T07:48:38.123Z] CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
- [2022-04-04T07:48:38.123Z] CMake Error at /mnt/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
Build failed on mac11/cxx17. Running on macphsft23.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-04T07:49:54.344Z] CMake Error at /Applications/CMake.app/Contents/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
- [2022-04-04T07:49:54.344Z] CMake Error at /Users/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
Build failed on windows10/cxx14. Running on null:C:\build\workspace\root-pullrequests-build See console output.
Errors:
- [2022-04-04T07:59:22.168Z] CMake Error at C:/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1083 (message):
Build failed on mac1015/python3. Running on macitois19.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-04T08:14:34.998Z] CMake Error at /Applications/CMake.app/Contents/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
- [2022-04-04T08:14:34.998Z] CMake Error at /Volumes/HDD2/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
Build failed on ROOT-performance-centos8-multicore/default. Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-04T08:14:39.793Z] CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
- [2022-04-04T08:14:40.051Z] CMake Error at /data/sftnight/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
Build failed on ROOT-ubuntu2004/soversion. Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-04T08:14:55.758Z] CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
- [2022-04-04T08:14:55.758Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
@ellert thanks for the PR, but it looks like it doesn't work...
@ellert thanks for the PR, but it looks like it doesn't work...
The tests seem to be run with fail-on-missing. Since most of the builtins have default OFF, I did the same for this one. With fail-on-missing enabled the build then fails if the system googletest is not there. So the test kind-of worked, since it tested this and acted accordingly.
Should I change the default value for the builtin_gtest to ON, or should the tests be changed to install the system googletest? It probably makes most sense for you to change the default. I will try that.
Starting build on ROOT-debian10-i386
/cxx14
, ROOT-performance-centos8-multicore
/default
, ROOT-ubuntu16
/nortcxxmod
, ROOT-ubuntu2004
/soversion
, mac1015
/python3
, mac11
/cxx17
, windows10
/cxx14
How to customize builds
Build failed on ROOT-performance-centos8-multicore/default. Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-07T07:29:26.437Z] CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
- [2022-04-07T07:29:26.437Z] CMake Error at /data/sftnight/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
Build failed on ROOT-ubuntu2004/soversion. Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-07T07:29:33.828Z] CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
- [2022-04-07T07:29:33.828Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
Build failed on ROOT-debian10-i386/cxx14. Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-07T07:29:35.096Z] CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
- [2022-04-07T07:29:35.355Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
Build failed on windows10/cxx14. Running on null:C:\build\workspace\root-pullrequests-build See console output.
Errors:
- [2022-04-07T07:31:20.505Z] CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
- [2022-04-07T07:31:20.505Z] CMake Error at C:/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
Build failed on ROOT-ubuntu16/nortcxxmod. Running on sft-ubuntu-1604-1.cern.ch:/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-07T07:34:21.064Z] CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
- [2022-04-07T07:34:21.064Z] CMake Error at /mnt/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
Build failed on mac1015/python3. Running on macitois21.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-07T07:34:24.505Z] CMake Error at /Applications/CMake.app/Contents/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
- [2022-04-07T07:34:24.505Z] CMake Error at /Volumes/HD2/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
That did not help. Even with the default set to ON, the CI tests are run with -Dbuiltin_gtest=Off, so they ignore the default. It seems that the test definition must be changed too. Where are the tests defined? rootspi? So for this to work in the CI testing it must be accompanied by a change in the definition of the CI tests to either call with -Dbuiltin_gtest=On (or at least not with an explicit -Dbuiltin_gtest=Off), or install the gtest-devel and gmock-devel packages in the test environment. Can someone give some pointers or help with the changes?
Build failed on mac11/cxx17. Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-07T07:58:56.428Z] CMake Error at /Applications/CMake.app/Contents/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
- [2022-04-07T07:58:56.705Z] CMake Error at /Users/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
@ellert I'll try to set up a VM with locally installed gtest-devel and gmock-devel packages, but I don't think we will change our CI 😉
@phsft-bot build with flags -Dbuiltin_gtest=ON
Starting build on ROOT-debian10-i386
/cxx14
, ROOT-performance-centos8-multicore
/default
, ROOT-ubuntu16
/nortcxxmod
, ROOT-ubuntu2004
/soversion
, mac1015
/python3
, mac11
/cxx17
, windows10
/cxx14
with flags -Dbuiltin_gtest=ON
How to customize builds
That did not help. Even with the default set to ON, the CI tests are run with -Dbuiltin_gtest=Off, so they ignore the default. It seems that the test definition must be changed too. Where are the tests defined? rootspi? So for this to work in the CI testing it must be accompanied by a change in the definition of the CI tests to either call with -Dbuiltin_gtest=On (or at least not with an explicit -Dbuiltin_gtest=Off), or install the gtest-devel and gmock-devel packages in the test environment. Can someone give some pointers or help with the changes?
I think builtin_gtest
should be added to the list of supported modules for different platforms in https://github.com/root-project/rootspi/blob/master/jenkins/root-build.cmake
(but only after this PR is merged)
@ellert BTW, is it supposed to work on all platforms?
Build failed on mac11/cxx17. Running on macphsft23.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
Build failed on mac1015/python3. Running on macitois21.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
Starting build on ROOT-debian10-i386
/cxx14
, ROOT-performance-centos8-multicore
/default
, ROOT-ubuntu16
/nortcxxmod
, ROOT-ubuntu2004
/soversion
, mac1015
/python3
, mac11
/cxx17
, windows10
/cxx14
How to customize builds
Build failed on ROOT-performance-centos8-multicore/default. Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-17T20:20:25.948Z] CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
- [2022-04-17T20:20:26.206Z] CMake Error at /data/sftnight/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
Build failed on ROOT-debian10-i386/cxx14. Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-17T20:20:33.784Z] CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
- [2022-04-17T20:20:33.784Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):
Build failed on ROOT-ubuntu2004/soversion. Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-04-17T20:20:34.088Z] CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
- [2022-04-17T20:20:34.088Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1155 (message):