From 4bab3a26021aefd1d2b70af742d3beee2bee6e9b Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 11 Feb 2024 21:42:37 +0100 Subject: [PATCH] gnu: google-highway: Fix tests on i686-linux. The tests are supposed to be skipped when there are problems with excess precision. * gnu/packages/cpp.scm (google-highway)[arguments]: Modify phases when building for i686-linux to conditionally patch the tests. Change-Id: I6381a8c9f65196fd1d7d4e4130d784863b634df5 --- gnu/packages/cpp.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 62a1923571..96423a311f 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2019 Jan Wielkiewicz ;;; Copyright © 2020, 2021 Nicolò Balzarotti ;;; Copyright © 2020 Roel Janssen -;;; Copyright © 2020, 2021, 2023 Ricardo Wurmus +;;; Copyright © 2020, 2021, 2023, 2024 Ricardo Wurmus ;;; Copyright © 2020 Brice Waegeneire ;;; Copyright © 2020, 2021, 2022 Vinicius Monego ;;; Copyright © 2020, 2022 Marius Bakke @@ -513,7 +513,17 @@ operating on batches.") (build-system cmake-build-system) (arguments `(#:configure-flags (list "-DHWY_SYSTEM_GTEST=on" - "-DBUILD_SHARED_LIBS=ON"))) + "-DBUILD_SHARED_LIBS=ON") + ,@(if (string-prefix? "i686-linux" (or (%current-system) + (%current-target-system))) + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'really-skip-precision-tests + (lambda _ + (substitute* "hwy/contrib/math/math_test.cc" + (("Skipping math_test due to GCC issue with excess precision.*" m) + (string-append m "return;\n"))))))) + '()))) (native-inputs (list googletest)) (home-page "https://github.com/google/highway")