gnu: rocksdb: Disable tests on 32-bit systems.

* gnu/packages/databases.scm (rocksdb)[arguments]: Make #:tests? conditional.
Delete unnecessary 'build' phase. Move portability environment variable
before check phase.
This commit is contained in:
Marius Bakke 2017-05-12 15:00:59 +02:00
parent ae836e513e
commit d7b344c5cd
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 14 additions and 3 deletions

View File

@ -586,9 +586,15 @@ types are supported, as is encryption.")
#t)))) #t))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:make-flags (list "CC=gcc" `(#:make-flags (list "CC=gcc"
(string-append "INSTALL_PATH=" (string-append "INSTALL_PATH="
(assoc-ref %outputs "out"))) (assoc-ref %outputs "out")))
;; Many tests fail on 32-bit platforms. There are multiple reports about
;; this upstream, but it's not going to be supported any time soon.
#:tests? (let ((system ,(or (%current-target-system)
(%current-system))))
(or (string-prefix? "x86_64-linux" system)
(string-prefix? "aarch64-linux" system)))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'patch-Makefile (add-after 'unpack 'patch-Makefile
@ -601,6 +607,13 @@ types are supported, as is encryption.")
(("#!/bin/sh") (string-append "#!" (which "sh")))) (("#!/bin/sh") (string-append "#!" (which "sh"))))
#t)) #t))
(delete 'configure) (delete 'configure)
;; The default target is only needed for tests and built on demand.
(delete 'build)
(add-before 'check 'disable-optimizations
(lambda _
;; Prevent the build from passing '-march=native' to the compiler.
(setenv "PORTABLE" "1")
#t))
(add-before 'check 'disable-failing-tests (add-before 'check 'disable-failing-tests
(lambda _ (lambda _
(substitute* "Makefile" (substitute* "Makefile"
@ -617,8 +630,6 @@ types are supported, as is encryption.")
;; targets for release builds so we build them here for clarity. ;; targets for release builds so we build them here for clarity.
;; TODO: Add debug output. ;; TODO: Add debug output.
(lambda* (#:key (make-flags '()) #:allow-other-keys) (lambda* (#:key (make-flags '()) #:allow-other-keys)
;; Prevent the build from adding machine-specific optimizations.
(setenv "PORTABLE" "1")
(zero? (apply system* "make" "shared_lib" make-flags))))))) (zero? (apply system* "make" "shared_lib" make-flags)))))))
(native-inputs (native-inputs
`(("parallel" ,parallel) `(("parallel" ,parallel)