Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMakeLists.txt: respect BUILD_TESTING #105

Merged
merged 1 commit into from May 1, 2021
Merged

CMakeLists.txt: respect BUILD_TESTING #105

merged 1 commit into from May 1, 2021

Conversation

ffontaine
Copy link
Contributor

Don't build tests if the standard cmake BUILD_TESTING variable is set to OFF.

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

Don't build tests if the standard cmake BUILD_TESTING variable is set to
OFF.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
@joto
Copy link
Collaborator

joto commented Apr 18, 2021

Similar to #103 and just as unnecessary.

@ffontaine
Copy link
Contributor Author

Thanks for pointing #103, I missed it.
However, in the context of embedded systems, this is not unnecessary as protozero fails to build on buildroot since its addition 2 days ago due to these tests. We have already 3 different build failures on the autobuilders.

Build fails on toolchains without wchar, extract from http://autobuild.buildroot.org/results/1cd/1cd24b757d87b963c70bc7ff927c6d983d0b142a/build-end.log:

[  7%] Building CXX object test/CMakeFiles/reader_tests.dir/reader_tests.cpp.o
In file included from /home/buildroot/autobuild/run/instance-0/output-1/build/protozero-1.7.0/test/include/test.hpp:4,
                 from /home/buildroot/autobuild/run/instance-0/output-1/build/protozero-1.7.0/test/unit/test_data_view.cpp:4:
/home/buildroot/autobuild/run/instance-0/output-1/build/protozero-1.7.0/test/catch/catch.hpp:1691:29: error: 'wstring' is not a member of 'std'
 1691 |     struct StringMaker<std::wstring> {
      |                             ^~~~~~~

Build fails on toolchains for sh4 (ICE), extract from http://autobuild.buildroot.org/results/3d8/3d8e841655a67ddaaa49ab9a93d1959b27d55cc7/build-end.log:

during RTL pass: final
In file included from /tmp/instance-1/output-1/build/protozero-1.7.0/test/t/repeated_packed_sint32/reader_test_cases.cpp:8:
/tmp/instance-1/output-1/build/protozero-1.7.0/test/include/packed_access.hpp: In function 'void ____C_A_T_C_H____T_E_S_T____24()':
/tmp/instance-1/output-1/build/protozero-1.7.0/test/include/packed_access.hpp:304:1: internal compiler error: in output_branch, at config/sh/sh.c:2755
  304 | }
      | ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.buildroot.net/> for instructions.

Build also fails if gcc is affected by bug 64735 (i.e. gcc < 7 on some architectures), extract from http://autobuild.buildroot.org/results/374/37468bec35713010ae3a10c0926ee0f5b482d874/build-end.log):

In file included from /nvme/rc-buildroot-test/scripts/instance-0/output-1/build/protozero-1.7.0/test/include/test.hpp:4:0,
                 from /nvme/rc-buildroot-test/scripts/instance-0/output-1/build/protozero-1.7.0/test/unit/main.cpp:3:
/nvme/rc-buildroot-test/scripts/instance-0/output-1/build/protozero-1.7.0/test/catch/catch.hpp: In member function 'std::string Catch::ExceptionTranslatorRegistrar::ExceptionTranslator<T>::translate(std::vector<std::unique_ptr<const Catch::IExceptionTranslator> >::const_iterator, std::vector<std::unique_ptr<const Catch::IExceptionTranslator> >::const_iterator) const':
/nvme/rc-buildroot-test/scripts/instance-0/output-1/build/protozero-1.7.0/test/catch/catch.hpp:3033:25: error: 'rethrow_exception' is not a member of 'std'
                         std::rethrow_exception(std::current_exception());
                         ^

If we can't disable those tests, what are your suggestion? Should we disable protozero on all those toolchains?

@joto joto merged commit 85db940 into mapbox:master May 1, 2021
@joto joto mentioned this pull request May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants