Subject: [PATCH v5 2/2] gnu: timescaledb: Ignore failing tests.

From: Nicolas Graves <[email-masked]>
Date: Thu, 17 Oct 2024 07:51:23 +0200

* gnu/packages/databases.scm (timescaledb):
[arguments]<#:phases>: Add phase 'patch-failing-tests.
---
 gnu/packages/databases.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 43ec0641a0..9725fe37f9 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1502,6 +1502,29 @@ (define-public timescaledb
                              "-o" (string-append "-k " pg-data)
                              "-l" (string-append pg-data "/db.log")
                              "start"))))
+               #$@(cond
+                   ((string=? "x86-64-linux" (%current-system))
+                    #~())
+                   ((string=? "aarch64-linux" (%current-system))
+                    #~((add-after 'unpack 'skip-failing-tests
+                         (lambda _
+                           (substitute* "test/sql/CMakeLists.txt"
+                             (((string-append
+                                "("
+                                (string-join
+                                 '("append\\.sql\\.in"
+                                   "chunk_adaptative\\.sql"
+                                   "histogram_test\\.sql\\.in")
+                                 "|")
+                                ")")
+                               all)
+                              (string-append "#" all)))))))
+                   (else
+                    #~((add-after 'unpack 'skip-failing-tests
+                         (lambda _
+                           (substitute* "test/sql/CMakeLists.txt"
+                             (("histogram_test\\.sql\\.in")
+                              "#histogram_test.sql.in")))))))
                (add-after 'prepare-tests 'check
                  (assoc-ref %standard-phases 'check)))))
     (inputs (list openssl postgresql))
-- 
2.46.0