aboutsummaryrefslogtreecommitdiff
path: root/tests/zlib.scm
blob: 7c595a422c34daf868010a4ba44993c7c22d8747 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2019 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (test-zlib)
  #:use-module (guix zlib)
  #:use-module (guix tests)
  #:use-module (srfi srfi-64)
  #:use-module (rnrs bytevectors)
  #:use-module (rnrs io ports)
  #:use-module (ice-9 match))

;; Test the (guix zlib) module.

(test-begin "zlib")

(unless (zlib-available?)
  (test-skip 1))
(test-assert "compression/decompression pipe"
  (let ((data (random-bytevector (+ (random 10000)
                                    (* 20 1024)))))
    (match (pipe)
      ((parent . child)
       (match (primitive-fork)
         (0                                       ;compress
          (dynamic-wind
            (const #t)
            (lambda ()
              (close-port parent)
              (call-with-gzip-output-port child
                (lambda (port)
                  (put-bytevector port data))))
            (lambda ()
              (primitive-exit 0))))
         (pid                                     ;decompress
          (begin
            (close-port child)
            (let ((received (call-with-gzip-input-port parent
                              (lambda (port)
                                (get-bytevector-all port))
                              #:buffer-size (* 64 1024))))
              (match (waitpid pid)
                ((_ . status)
                 (and (zero? status)
                      (port-closed? parent)
                      (bytevector=? received data))))))))))))

(test-end)
sg-avail'>...* build-aux/hydra/guix.scm (tarball-package): Add GRAPHVIZ and HELP2MAN to 'native-inputs' of GUIX. Ludovic Courtès 2015-10-13hydra: Update demo OS to new service interface....* build-aux/hydra/demo-os.scm: Import (gnu services dbus); remove arguments to 'dbus-service'. Ludovic Courtès 2015-10-04Use "normalized codesets" everywhere....In other words, change "xx_YY.UTF-8" to "xx_YY.utf8". * guix/profiles.scm (ca-certificate-bundle): Use "en_US.utf8" instead of "en_US.UTF-8". * guix/packages.scm (patch-and-repack): Likewise. * guix/build/gnu-build-system.scm (install-locale): Likewise. * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Likewise. * gnu/packages/python.scm (python-ipython): Likewise. * gnu/packages/gawk.scm (gawk): Likewise. * build-aux/hydra/demo-os.scm: Likewise. * gnu/packages/guile.scm (guile-ncurses)[arguments]: Remove 'change-locale' phase. Ludovic Courtès 2015-09-09hydra: Remove cross-builds from armhf-linux to mips64el-linux-gnuabi64....* build-aux/hydra/gnu-system.scm (hydra-jobs)[cross-jobs]: Modify 'from-32-to-64?' to include 'armhf-linux' in the set of 32-bit systems. Mark H Weaver 2015-07-21check-available-binaries: Use 'substitutable-paths'....* build-aux/check-available-binaries.scm: Rewrite to use 'substitutable-paths' instead of 'substitution-oracle'. The latter does more than we need, and it no longer check the substitutability of valid items, which is not what we want. Use 'lset-difference' instead of iterating over the items. Ludovic Courtès 2015-07-19gnu: gcc-5.1, gcc-toolchain-5.1, libstdc++-doc-5.1: Rename to *-5....This reflects the new version numbering scheme for GCC 5 and up. See <https://gcc.gnu.org/develop.html>. * gnu/packages/gcc.scm (gcc-5.1): Rename to ... (gcc-5): ... this. (libstdc++-doc-5.1): Rename to ... (libstdc++-doc-5): ... this, and use gcc-5. * gnu/packages/commencement.scm (gcc-toolchain-5.1): Rename to ... (gcc-toolchain-5): ... this, and use gcc-5. * build-aux/hydra/gnu-system.scm (%core-packages): Use gcc-5. Mark H Weaver 2015-07-06build: Generate 'AUTHORS'....* build-aux/generate-authors.scm: New file. * Makefile.am (gen-AUTHORS): New target. (dist-hook, .PHONY): Add it. Alex Kost 2015-06-18Merge branch 'master' into core-updatesMark H Weaver 2015-06-18hydra: Fix the demo OS....* build-aux/hydra/demo-os.scm: Don't try to import (gnu services dbus), which no longer exists. Use 'use-service-modules' and 'use-package-modules'. Use "en_US.UTF-8" as system locale. Mark H Weaver 2015-06-17list-packages: Move to guix-artwork repository....In order to integrate the package list in the GuixSD website, the listing of packages has been moved into the website implementation. * build-aux/list-packages.scm: Remove file. * Makefile.am (EXTRA_DIST): Adapt to it. Mathieu Lirzin 2015-06-16hydra: Remove GCC 4.7 from the core set, and add 4.9 and 5.1....* build-aux/hydra/gnu-system.scm (%core-packages): Remove GCC-4.7. Add GCC-4.9 and GCC-5.1. Ludovic Courtès 2015-05-29hydra: Support per-package absolute build timeouts....* build-aux/hydra/gnu-system.scm (package->alist): Use the 'timeout' value in the package 'properties' alist, if present. Mark H Weaver 2015-05-21ui: Deduplicate 'show-what-to-build*'....* guix/ui.scm (show-what-to-build*): New procedure. * guix/scripts/environment.scm (show-what-to-build*): Delete. * guix/scripts/system.scm (show-what-to-build*): Likewise. * build-aux/make-binary-tarball.scm (show-what-to-build*): Likewise. David Thompson 2015-05-15hydra: Increase USB image size....* build-aux/hydra/gnu-system.scm (qemu-jobs): Increase disk image size to 860 MiB, for x86_64. Ludovic Courtès 2015-05-10build: check-final-inputs-self-contained uses %HYDRA-SUPPORTED-SYSTEMS....* build-aux/check-final-inputs-self-contained.scm: Change '%supported-systems' to '%hydra-supported-systems'. Ludovic Courtès 2015-05-02Merge branch 'core-updates'Ludovic Courtès 2015-05-02hydra: Update Guix job set....* build-aux/hydra/guix.scm (tarball-package): Remove 'nix-checkout' parameter. Remove 'arguments', 'native-inputs', and 'location' fields. Adjust caller accordingly. (hydra-jobs): Remove 'nix-checkout'. Ludovic Courtès 2015-05-01check-available-binaries: Use %HYDRA-SUPPORTED-SYSTEMS....* build-aux/check-available-binaries.scm: Use %HYDRA-SUPPORTED-SYSTEMS instead of %SUPPORTED-SYSTEMS. Ludovic Courtès 2015-05-01list-packages: Add status link only for systems supported on Hydra....* build-aux/list-packages.scm (package->sxml)[status]: Intersect (package-transitive-supported-systems package) with %HYDRA-SUPPORTED-SYSTEMS. Ludovic Courtès 2015-05-01packages: Add '%hydra-supported-systems'....* build-aux/hydra/gnu-system.scm (%hydra-supported-systems): Remove. * guix/packages.scm (%hydra-supported-systems): New variable. Ludovic Courtès 2015-04-22hydra: Add %hydra-supported-systems variable and use it....* build-aux/hydra/gnu-system.scm (%hydra-supported-systems): New variable. (hydra-jobs): Use %hydra-supported-systems instead of %supported-systems. Mark H Weaver 2015-04-19packages: Add 'supported-package?'....* guix/packages.scm (supported-package?): New procedure. * tests/packages.scm ("supported-package?"): New test. * build-aux/hydra/gnu-system.scm (package->job): Use it instead of 'package-transitive-supported-systems'. Ludovic Courtès 2015-04-17Merge branch 'master' into core-updates...Conflicts: gnu-system.am gnu/packages/gstreamer.scm Mark H Weaver 2015-04-16hydra: Increase size of USB image....* build-aux/hydra/gnu-system.scm (qemu-jobs) <usb-image>: Increase from 800 MiB to 850 MiB. Ludovic Courtès 2015-04-14build: Add missing 'make-binary-tarball.scm' script....This script is used by the target added in 9d3fb6c. * build-aux/make-binary-tarball.scm: New file. * Makefile.am (EXTRA_DIST): Add it. Ludovic Courtès 2015-04-14hydra: Add jobs for the self-contained tarball....* build-aux/hydra/gnu-system.scm (tarball-jobs): New procedure. (hydra-jobs): Use it. Ludovic Courtès 2015-03-06list-packages: Use GuixSD logo and name....* build-aux/list-packages.scm (packages->sxml): Change to use GuixSD-V.png and use the name "Guix System Distribution". Ludovic Courtès 2015-02-24build: Disable grafting in sanity checks....* build-aux/check-available-binaries.scm: Wrap body in 'parameterize' form that clears '%graft?'. * build-aux/check-final-inputs-self-contained.scm: Likewise. Ludovic Courtès 2015-01-16Merge branch 'core-updates'...Conflicts: gnu/packages/bootstrap.scm Ludovic Courtès 2015-01-14check-available-binaries: Use 'substitution-oracle'....* build-aux/check-available-binaries.scm: Use 'substitution-oracle'. Changer caller and 'warn' accordingly. Ludovic Courtès 2015-01-14check-available-binaries: Use 'with-store'....* build-aux/check-available-binaries.scm: Use 'with-store' instead of an explicit 'open-connection'. Ludovic Courtès 2015-01-14build: Use the canonical list of supported systems in 'assert-*'....* build-aux/check-available-binaries.scm (%supported-systems): Remove. * build-aux/check-final-inputs-self-contained.scm (%supported-systems): Remove. Ludovic Courtès 2015-01-14monads: Move '%store-monad' and related procedures where they belong....This turns (guix monads) into a generic module for monads, and moves the store monad and related monadic procedures in their corresponding module. * guix/monads.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file, package-file, package->derivation, package->cross-derivation, origin->derivation, imported-modules, compiled, modules, built-derivations, run-with-store): Move to... * guix/store.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file): ... here. (%guile-for-build): New variable. (run-with-store): Moved from monads.scm. Remove default value for #:guile-for-build. * guix/packages.scm (default-guile): Export. (set-guile-for-build): New procedure. (package-file, package->derivation, package->cross-derivation, origin->derivation): Moved from monads.scm. * guix/derivations.scm (%guile-for-build): Remove. (imported-modules): Rename to... (%imported-modules): ... this. (compiled-modules): Rename to... (%compiled-modules): ... this. (built-derivations, imported-modules, compiled-modules): New procedures. * gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm, gnu/services/dmd.scm, gnu/services/networking.scm, gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm, gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm, guix/gexp.scm, guix/git-download.scm, guix/profiles.scm, guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly. * guix/monad-repl.scm (default-guile-derivation): New procedure. (store-monad-language, run-in-store): Use it. * build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit 'set-guile-for-build' call. * guix/scripts/archive.scm (derivation-from-expression): Likewise. * guix/scripts/build.scm (options/resolve-packages): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * doc/guix.texi (The Store Monad): Adjust module names accordingly. Ludovic Courtès 2015-01-07gnu: Add bootstrap binaries for 'armhf-linux'....* gnu/packages/bootstrap/armhf-linux/bash, gnu/packages/bootstrap/armhf-linux/mkdir, gnu/packages/bootstrap/armhf-linux/tar, gnu/packages/bootstrap/armhf-linux/xz: New files. * gnu-system.am (bootstrap_armhf_linuxdir, dist_bootstrap_armhf_linux_DATA) (nodist_bootstrap_armhf_linux_DATA): New variables. (DISTCLEANFILES): Add $(nodist_bootstrap_armhf_linux_DATA). (gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz): New target. * build-aux/download.scm (file-name->uri): Use newer date in URI for armhf-linux. * gnu/packages/bootstrap.scm (raw-build): Use "guile-2.0.11.tar.xz" on armhf-linux. (glibc-dynamic-linker, %bootstrap-coreutils&co, %bootstrap-binutils) (%bootstrap-glibc, %bootstrap-gcc): Add armhf-linux cases. * m4/guix.m4 (GUIX_SYSTEM_TYPE): Add armhf case. (GUIX_ASSERT_SUPPORTED_SYSTEM): Add armhf-linux to list of supported systems. * doc/guix.texi (GNU Distribution): Add armhf-linux to the list of supported systems. Mark H Weaver 2014-12-29list-packages: Expand 'mirror://' URIs for patches....* build-aux/list-packages.scm (package->sxml)[patches](patch-url): Use 'maybe-expand-mirrors' to get the real URL. Ludovic Courtès 2014-11-29system: Change "en_US.UTF-8" to "en_US.utf8"....* build-aux/hydra/demo-os.scm (locale): Change to "en_US.utf8". * gnu/system/install.scm (installation-os)[locale]: Ditto. Ludovic Courtès 2014-11-21hydra: Build only non-grafted variants of the packages....* build-aux/hydra/gnu-system.scm (package->alist): Pass #:graft? #f. (package-cross-job): Adjust last argument of 'package->alist' to accept #:graft?. This fixes the problem reported in commit a480307. Ludovic Courtès 2014-11-19lint: Fold 'sync-descriptions' script as 'gnu-description' lint checker....* build-aux/sync-descriptions.scm: Remove. Move payload to... * guix/scripts/lint.scm: ... here. (escape-quotes, official-gnu-packages*, check-gnu-synopsis+description): New procedures. (%checkers): Add 'gnu-descriptions'. * Makefile.am (EXTRA_DIST): Remove build-aux/sync-descriptions.scm. (sync-descriptions): Use 'guix lint'. Ludovic Courtès 2014-11-13Revert "hydra: Build only non-grafted variants of the packages."...This reverts commit 9de1defe790d8baa6a230b2d02e7ba023783b022. Passing #:graft? was not possible because of the use of 'cut' on call sites. Ludovic Courtès 2014-11-13hydra: Build only non-grafted variants of the packages....* build-aux/hydra/gnu-system.scm (package->alist): Pass #:graft? #f to PACKAGE-DERIVATION. Ludovic Courtès