summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrett Gilio <brettg@gnu.org>2020-01-04 14:50:52 -0600
committerBrett Gilio <brettg@gnu.org>2020-01-04 14:50:52 -0600
commit5a92e7c9542f60cfe9d932833bbe61d0af7a2860 (patch)
tree34f735010acef28ecccb2495c1c39f36e7b96c8d
parent198af489dee68146371ab5fcabe25bac99ea2d70 (diff)
downloadguix-5a92e7c9542f60cfe9d932833bbe61d0af7a2860.tar.gz
gnu: swi-prolog: Enable tests.
* gnu/packages/prolog.scm (swi-prolog)[arguments]: Enable tests and work
  around tests that cause failure by trying to write to the store, or
  establishing a network connection.
-rw-r--r--gnu/packages/prolog.scm28
1 files changed, 27 insertions, 1 deletions
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 4963691cb5..bd89c9ad2f 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -100,11 +100,37 @@ manner.  It also features an interactive interpreter.")
     (build-system cmake-build-system)
     (arguments
      `(#:parallel-build? #t
-       #:tests? #f ; FIXME: Some tests require network access.
+       #:tests? #t
        #:configure-flags
        (list "-DINSTALL_DOCUMENTATION=ON"
              "-DBUILD_PDF_DOCUMENTATION=ON"
              "-DSWIPL_INSTALL_IN_LIB=OFF"))) ; FIXME: Breaks RUNPATH validation.
+       #:phases
+       (modify-phases %standard-phases
+         ;; XXX: Delete a variety of tests which fail either attempting to
+         ;; establish a network connection, or attempts to write to the
+         ;; immutable store. Phases marked *-pre are disabled /before/ building.
+         ;; Phases marked *-post are disabled /after/ building.
+         (add-after 'unpack 'delete-failing-tests-pre
+           (lambda _
+             (substitute* "src/CMakeLists.txt"
+               ((" save") ""))
+             (substitute* "src/test.pl"
+               (("testdir\\('Tests/save'\\).") ""))
+             (with-directory-excursion "src/Tests"
+               (for-each delete-file-recursively
+                         '("save")))
+             #t))
+         (add-before 'check 'delete-failing-tests-post
+           (lambda _
+             (with-directory-excursion "packages"
+               (for-each delete-file-recursively
+                         '("http"
+                           "pengines"
+                           "RDF"
+                           "semweb"
+                           "ssl")))
+             #t)))))
     (native-inputs
      `(("zlib" ,zlib)
        ("gmp" ,gmp)