Skip to content

Commit

Permalink
ut: remove clang workaround after upstream fixes
Browse files Browse the repository at this point in the history
UT fixed the initialisation of the command line arguments for clang in
boost-ext/ut@3cfd993.
This change removes the special case which disables the junit style ut
reporter in most unit tests.

For qa_grc there is still a segfault if the junit reporter is enablet
but this seems to be a slightly different case. The segfault occurs in
the static initialisation of the block registy in gr::registerBlock.
  • Loading branch information
wirew0rm committed Apr 3, 2024
1 parent dbde8eb commit a00b20c
Show file tree
Hide file tree
Showing 18 changed files with 1 addition and 104 deletions.
6 changes: 0 additions & 6 deletions blocks/basic/test/qa_DataSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@

using namespace std::chrono_literals;

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

template<>
struct fmt::formatter<gr::Tag> {
template<typename ParseContext>
Expand Down
6 changes: 0 additions & 6 deletions blocks/basic/test/qa_sources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
#include <gnuradio-4.0/basic/SignalGenerator.hpp>
#include <gnuradio-4.0/testing/TagMonitors.hpp>

#if defined(__clang__) && __clang_major__ >= 15
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

template<typename T>
constexpr void
addTimeTagEntry(gr::basic::ClockSource<T> &clockSource, std::uint64_t timeInNanoseconds, const std::string &value) {
Expand Down
6 changes: 0 additions & 6 deletions blocks/filter/test/qa_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

#include <gnuradio-4.0/filter/time_domain_filter.hpp>

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

template<typename T, typename Range>
requires std::floating_point<T>
constexpr size_t
Expand Down
6 changes: 0 additions & 6 deletions blocks/fourier/test/qa_fourier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@

#include <gnuradio-4.0/fourier/fft.hpp>

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

template<typename T>
std::vector<T>
generateSinSample(std::size_t N, double sample_rate, double frequency, double amplitude) {
Expand Down
6 changes: 0 additions & 6 deletions blocks/http/test/qa_HttpBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@

#include <gnuradio-4.0/http/HttpBlock.hpp>

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

template<typename T>
class FixedSource : public gr::Block<FixedSource<T>> {
using super_t = gr::Block<FixedSource<T>>;
Expand Down
6 changes: 0 additions & 6 deletions blocks/testing/test/qa_UI_Integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
#include "gnuradio-4.0/testing/ImChartMonitor.hpp"
#include "gnuradio-4.0/testing/TagMonitors.hpp"

#if defined(__clang__) && __clang_major__ >= 15
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

const boost::ut::suite TagTests = [] {
using namespace boost::ut;
using namespace gr;
Expand Down
6 changes: 0 additions & 6 deletions core/test/qa_Block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
#include <gnuradio-4.0/Scheduler.hpp>
#include <gnuradio-4.0/testing/TagMonitors.hpp>

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

#if !DISABLE_SIMD
namespace gr::test {
struct copy : public Block<copy> {
Expand Down
6 changes: 0 additions & 6 deletions core/test/qa_DynamicPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@

#include <gnuradio-4.0/meta/utils.hpp>

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

using namespace std::string_literals;

#ifdef ENABLE_DYNAMIC_PORTS
Expand Down
6 changes: 0 additions & 6 deletions core/test/qa_Messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@

#include <optional>

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

using namespace std::chrono_literals;
using namespace std::string_literals;

Expand Down
6 changes: 0 additions & 6 deletions core/test/qa_Scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

#include <gnuradio-4.0/Scheduler.hpp>

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

using TraceVectorType = std::vector<std::string>;

class Tracer {
Expand Down
6 changes: 0 additions & 6 deletions core/test/qa_Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@

using namespace std::string_literals;

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

namespace gr::setting_test {

namespace utils {
Expand Down
6 changes: 0 additions & 6 deletions core/test/qa_Tags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ static_assert(HasRequiredProcessFunction<TagSink<int, ProcessFunction::USE_PROCE
static_assert(HasRequiredProcessFunction<TagSink<int, ProcessFunction::USE_PROCESS_BULK>>);
} // namespace gr::testing

#if defined(__clang__) && __clang_major__ >= 15
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

const boost::ut::suite TagTests = [] {
using namespace boost::ut;
using namespace gr;
Expand Down
6 changes: 0 additions & 6 deletions core/test/qa_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
#include <gnuradio-4.0/Sequence.hpp>
#include <gnuradio-4.0/WaitStrategy.hpp>

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

template<gr::WaitStrategy auto wait = gr::NoWaitStrategy()>
struct TestStruct {
[[nodiscard]] constexpr bool
Expand Down
3 changes: 1 addition & 2 deletions core/test/qa_grc.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <algorithm>
#include <fstream>
#include <iostream>
#include <ranges>
Expand All @@ -16,7 +15,7 @@
#include <boost/ut.hpp>

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
// for clang there seems to be some static initialisation problem which leads to segfaults in gr::registerBlock
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif
Expand Down
6 changes: 0 additions & 6 deletions core/test/qa_plugins_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
#include <gnuradio-4.0/BlockRegistry.hpp>
#include <gnuradio-4.0/PluginLoader.hpp>

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

using namespace std::chrono_literals;

template<typename T>
Expand Down
6 changes: 0 additions & 6 deletions core/test/qa_reader_writer_lock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

#include <gnuradio-4.0/reader_writer_lock.hpp>

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

namespace gr::reader_writer_lock_test {

const boost::ut::suite basicTests = [] {
Expand Down
6 changes: 0 additions & 6 deletions core/test/qa_thread_affinity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@

#include <gnuradio-4.0/thread/thread_affinity.hpp>

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

const boost::ut::suite ThreadAffinityTests = [] {
using namespace boost::ut;

Expand Down
6 changes: 0 additions & 6 deletions core/test/qa_thread_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

#include <gnuradio-4.0/thread/thread_pool.hpp>

#if defined(__clang__) && __clang_major__ >= 16
// clang 16 does not like ut's default reporter_junit due to some issues with stream buffers and output redirection
template<>
auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter<>>{};
#endif

const boost::ut::suite ThreadPoolTests = [] {
using namespace boost::ut;

Expand Down

0 comments on commit a00b20c

Please sign in to comment.