summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-05-12 15:00:59 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-05-12 15:00:59 +0200
commitd7b344c5cde517e5b50be5f9cd2d5d07621cb8b1 (patch)
tree2038641c383d063d915362bcfcacf0bd4b3928c7 /gnu
parentae836e513e366744aa57fcb0104ffc95e47080ad (diff)
downloadpatches-d7b344c5cde517e5b50be5f9cd2d5d07621cb8b1.tar
patches-d7b344c5cde517e5b50be5f9cd2d5d07621cb8b1.tar.gz
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/databases.scm17
1 files changed, 14 insertions, 3 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 19ae1ecedc..29554e95a8 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -586,9 +586,15 @@ types are supported, as is encryption.")
#t))))
(build-system gnu-build-system)
(arguments
- '(#:make-flags (list "CC=gcc"
+ `(#:make-flags (list "CC=gcc"
(string-append "INSTALL_PATH="
(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
(modify-phases %standard-phases
(add-after 'unpack 'patch-Makefile
@@ -601,6 +607,13 @@ types are supported, as is encryption.")
(("#!/bin/sh") (string-append "#!" (which "sh"))))
#t))
(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
(lambda _
(substitute* "Makefile"
@@ -617,8 +630,6 @@ types are supported, as is encryption.")
;; targets for release builds so we build them here for clarity.
;; TODO: Add debug output.
(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)))))))
(native-inputs
`(("parallel" ,parallel)