Date: Tue, 23 Apr 2024 17:37:56 GMT From: Matthias Andree <mandree@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 160df1b4d171 - main - textproc/source-highlight: fix "make test" or -DWITH_TESTING build Message-ID: <202404231737.43NHbu9r057303@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mandree: URL: https://cgit.FreeBSD.org/ports/commit/?id=160df1b4d1717d272b35802b665c7593869a1ebd commit 160df1b4d1717d272b35802b665c7593869a1ebd Author: Matthias Andree <mandree@FreeBSD.org> AuthorDate: 2024-04-23 17:31:41 +0000 Commit: Matthias Andree <mandree@FreeBSD.org> CommitDate: 2024-04-23 17:35:33 +0000 textproc/source-highlight: fix "make test" or -DWITH_TESTING build The normal build works for me, but "make test", or poudriere-devel builds on FreeBSD 14.0-RELEASE amd64 under WITH_TESTING=yes, fail for me in the test phase. Fix two compiler bugs that LLVM/clang asserts: * lib/tests/stdboosterror.h poses a most vexing parse, resolve by switching to C++11 uniform initialization (GCC 12 or 13 disambiguates by resolving to variable init.) * lib/tests/test_wordtokenizer_main.cpp sees LLVM/clang complain about unresolved operator<< (needs to be defined earlier, so move the declaration up) (couldn't test with GCC) Serialize tests/Makefile: * tests/Makefile* causes "No such file or directory" errors when running with MAKE_JOBS, so patch a .NOTPARALLEL into the Makefile. Approved by: portmgr@ (blanket just-fix-it approval for failing build) --- .../files/patch-lib_tests_stdboosterror.h | 11 +++++++++++ .../patch-lib_tests_test__wordtokenizer__main.cpp | 22 ++++++++++++++++++++++ .../source-highlight/files/patch-tests_Makefile.in | 13 +++++++++++-- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/textproc/source-highlight/files/patch-lib_tests_stdboosterror.h b/textproc/source-highlight/files/patch-lib_tests_stdboosterror.h new file mode 100644 index 000000000000..d6c52e70e63e --- /dev/null +++ b/textproc/source-highlight/files/patch-lib_tests_stdboosterror.h @@ -0,0 +1,11 @@ +--- lib/tests/stdboosterror.h.orig 2019-06-02 15:22:17 UTC ++++ lib/tests/stdboosterror.h +@@ -4,7 +4,7 @@ static boost::regex_error + #include <boost/regex/pattern_except.hpp> + + static boost::regex_error +- std_boost_exception(boost::regex_error(boost::regex_constants::error_bad_pattern)); ++ std_boost_exception{boost::regex_error(boost::regex_constants::error_bad_pattern)}; + + /** + * returns the string representing a standard exception (which diff --git a/textproc/source-highlight/files/patch-lib_tests_test__wordtokenizer__main.cpp b/textproc/source-highlight/files/patch-lib_tests_test__wordtokenizer__main.cpp new file mode 100644 index 000000000000..f56001ece7a2 --- /dev/null +++ b/textproc/source-highlight/files/patch-lib_tests_test__wordtokenizer__main.cpp @@ -0,0 +1,22 @@ +--- lib/tests/test_wordtokenizer_main.cpp.orig 2018-10-09 17:21:21 UTC ++++ lib/tests/test_wordtokenizer_main.cpp +@@ -3,15 +3,16 @@ + #endif + + #include <iostream> +- +-#include "asserttestexit.h" + #include "srchilite/wordtokenizer.h" +-#include "srchilite/tostringcollection.h" + + using namespace std; + using namespace srchilite; + + static ostream &operator <<(ostream &os, const WordTokenizer::WordTokenizerResults::value_type &); ++ ++#include "asserttestexit.h" ++#include "srchilite/tostringcollection.h" ++ + + ostream &operator <<(ostream &os, const WordTokenizer::WordTokenizerResults::value_type &token) { + if (token.first.size()) { diff --git a/textproc/source-highlight/files/patch-tests_Makefile.in b/textproc/source-highlight/files/patch-tests_Makefile.in index 956ceeb09c5b..f798822f22bb 100644 --- a/textproc/source-highlight/files/patch-tests_Makefile.in +++ b/textproc/source-highlight/files/patch-tests_Makefile.in @@ -1,6 +1,15 @@ ---- tests/Makefile.in.orig 2016-08-25 16:54:10 UTC +--- tests/Makefile.in.orig 2024-04-23 17:29:34 UTC +++ tests/Makefile.in -@@ -2108,7 +2108,7 @@ check_defaults: +@@ -14,6 +14,8 @@ + + @SET_MAKE@ + ++.NOTPARALLEL: # some of the java-related tests can't run in parallel ++ + # Copyright (C) 1999-2008 Lorenzo Bettini <http://www.lorenzobettini.it> + # + # This file is free software; as a special exception the author gives +@@ -2240,7 +2242,7 @@ check_defaults: @NO_CTAGS_FALSE@ sed -itesttmp -e 's/\_tmp\.h/\.h/g' test_refs_tmp.h.html test_refs_tmp.cpp.html @NO_CTAGS_FALSE@ sed -itesttmp -e 's/\_tmp\.cpp/\.cpp/g' test_refs_tmp.h.html test_refs_tmp.cpp.html @NO_CTAGS_FALSE@ $(CPP2LATEX_WREFS) -i $(srcdir)/test.h -o test_ref.out.tex $(CTAGS_COMMAND_TMP)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404231737.43NHbu9r057303>