From a9946dabcb8ef0e13124930e70bb9060ad04eb5e Mon Sep 17 00:00:00 2001 From: ng0 Date: Thu, 28 Sep 2017 15:36:45 +0000 Subject: [PATCH] contrib: guix: Add gnunetg-test. Build with testsuite but without experimental features. --- .../guix/packages/gnunet/packages/gnunet.scm | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/contrib/packages/guix/packages/gnunet/packages/gnunet.scm b/contrib/packages/guix/packages/gnunet/packages/gnunet.scm index cb30572a1..fbc132d78 100644 --- a/contrib/packages/guix/packages/gnunet/packages/gnunet.scm +++ b/contrib/packages/guix/packages/gnunet/packages/gnunet.scm @@ -333,6 +333,47 @@ (zero? (system* "make" "check")))))))) (synopsis "gnunet, full git with tests enabled with parallel tests"))) +(define-public gnunetg-test + (package + (inherit gnunetg) + (name "gnunetg-test") + (arguments + `(#:configure-flags + (list (string-append "--with-nssdir=" %output "/lib") + "--enable-gcc-hardening" + "--enable-linker-hardening" + + ;;"--enable-poisoning" + ;;"--enable-sanitizer" + "--enable-logging=verbose" + "CFLAGS=-ggdb -O0") + ;; #:parallel-tests? #f ; parallel building seems to fail + ;;#:tests? #f ; fail: test_gnunet_statistics.py + #:phases + ;; swap check and install phases and set paths to installed bin + (modify-phases %standard-phases + (add-after 'unpack 'patch-bin-sh + (lambda _ + (substitute* "bootstrap" + (("contrib/pogen.sh") "sh contrib/pogen.sh")) + (for-each (lambda (f) (chmod f #o755)) + (find-files "po" "")) + #t)) + (add-after 'patch-bin-sh 'bootstrap + (lambda _ + (zero? (system* "sh" "bootstrap")))) + (delete 'check) + ;; XXX: https://gnunet.org/bugs/view.php?id=4619 + (add-after 'install 'set-path-for-check + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (lib (string-append out "/lib"))) + (setenv "GNUNET_PREFIX" lib) + (setenv "PATH" (string-append (getenv "PATH") ":" bin)) + (zero? (system* "make" "check")))))))) + (synopsis "gnunet, full git with tests enabled without experimental"))) + ;; ... and one package to test the package with "parallel-tests? #f" (define-public gnunetgftn (package -- 2.25.1