From d07deb4cbbaea4c9e70fe4dd59de30fd09f31733 Mon Sep 17 00:00:00 2001 From: Petr Pucil Date: Mon, 11 Mar 2024 17:16:33 +0100 Subject: [PATCH] cpp_builder: remove workaround of Boost 1.62 bug, drop JUnit support This drops support for Boost 1.62, but I don't see much value in supporting this broken version specifically, given that none of the `cpp_stl` targets use it at the moment. As of March 2024, we're using these versions: * Boost 1.54.0 - in `{clang3.4,gcc4.8}-linux-x86_64` targets, since they both run on Ubuntu 14.04 (see https://github.com/kaitai-io/kaitai_struct_docker_images/blob/ef0ad6e3/src/cpp_stl/gcc4.8-linux-x86_64/Dockerfile#L1), which comes with this version of Boost: https://launchpad.net/ubuntu/trusty/+source/boost-defaults * Boost 1.71.0 - in `msvc141-windows-x64` (https://ci.appveyor.com/project/kaitai-io/ci-targets/builds/49319128/job/282j67vaxhklm2o4?fullLog=true#L120) * Boost 1.74.0 - in `{clang11,gcc11}-linux-x86_64`, since they both run on Ubuntu 22.04 (see https://github.com/kaitai-io/kaitai_struct_docker_images/blob/ef0ad6e3/src/cpp_stl/gcc11-linux-x86_64/Dockerfile#L1), which comes with this version of Boost: https://launchpad.net/ubuntu/jammy/+source/boost-defaults * Boost 1.84.0 - in `clang14-macos-x86_64` On top of that, the documented workaround of the bug (`--log_sink` broken in Boost v1.62) in the code inadverently changed the log format to JUnit (`--logger=JUNIT,...`), which is apparently why additional code had to be added in 5d2125c50197de2b32727bdaf26fb23f72ac3fb6 to support JUnit test result format in addition to the Boost-specific XML format. This part is definitely unnecessary - there's no reason why we should support two log formats, we should choose one. Even in Boost 1.62 the XML format was definitely available as well, though it would have to be specified as `--logger=XML,...` instead of `--log_format=XML` (see https://web.archive.org/web/20221205203459/https://svn.boost.org/trac10/ticket/12507). It looks like the reason the workaround uses JUnit is that the `--logger=JUNIT,...` option was copied from the [Stack Overflow answer](https://stackoverflow.com/a/39999085/487064) mentioned in the code comment without thinking. Fun fact: apparently, there hasn't been a single run using Boost 1.62 since December 2018, because there isn't any occurrence of ` e - # ignore - end - # Choose test executable case @mode when :msbuild_windows @@ -339,7 +321,7 @@ def run_tests tests_cli = [ ks_tests_bin, '--log_format=XML', - boost_log_option, + "--log_sink=#{xml_log}", '--log_level=all', '--report_level=detailed', ]