summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* tests: Skip 'guix-pack.sh'.Ludovic Courtès2018-07-05
| | | | | | | This works around a regression introduced in commit 66e9944e078cbb9e0d618377dd6df6e639640efa while waiting for a proper fix. * tests/guix-pack.sh: Add "exit 77".
* syscalls: Define AT_SYMLINK_NOFOLLOW et al.Ludovic Courtès2018-07-03
| | | | | | * guix/build/syscalls.scm (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR) (AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, AT_EMPTY_PATH): New variables. * tests/syscalls.scm ("utime with AT_SYMLINK_NOFOLLOW"): New test.
* deduplication: Place link files under /gnu/store/.links.Ludovic Courtès2018-07-03
| | | | | | | | | | | | Previously they'd always be placed next to TO-REPLACE, which would lead to EPERM in some cases. * guix/store/deduplication.scm (replace-with-link): Add #:swap-directory parameter and honor it. Add call to 'make-file-writable'. Catch 'system-error' around 'rename-file'. (deduplicate): Pass #:swap-directory and remove uses of 'false-if-system-error'. * tests/store-deduplication.scm ("deduplicate"): Add 'chmod' call.
* system: Mapped devices needed for boot do not yield Shepherd services.Ludovic Courtès2018-06-21
| | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/31889>. Reported by Taylan Kammer <taylanbayirli@gmail.com>. * gnu/system.scm (non-boot-file-system-service)[mapped-devices-for-boot]: New variable. Remove dependencies of FS that are members of MAPPED-DEVICES-FOR-BOOT. (mapped-device-user): Rename to... (mapped-device-users): ... this. Use 'filter' instead of 'find'. (operating-system-user-mapped-devices) (operating-system-boot-mapped-devices): Use 'any file-system-needed-for-boot?' instead of looking at the first user. * tests/system.scm ("non-boot-file-system-service"): New test.
* Remove 'guix-register' and its traces.Ludovic Courtès2018-06-14
| | | | | | | | | | | | | | | | | | | * Makefile.am (SH_TESTS): Remove tests/guix-register.sh. * build-aux/pre-inst-env.in (GUIX_REGISTER): Remove. * gnu/build/install.scm (directives): Remove outdated comment. * gnu/build/vm.scm (root-partition-initializer): Update comment. * gnu/packages/package-management.scm (guix-register): Remove. * guix/config.scm.in (%sbindir, %guix-register-program): Remove. * guix/scripts/system.scm (install): Adjust docstring. * guix/self.scm (make-config.scm): Remove #:guix. Do not generate %sbindir and %guix-register-program. (specification->package): Remove "guix". * nix/guix-register/guix-register.cc: Remove. * nix/libstore/store-api.cc (decodeValidPathInfo): Remove. * nix/libstore/store-api.hh (decodeValidPathInfo): Remove declaration. * nix/local.mk (sbin_PROGRAMS, guix_register_SOURCES) (guix_register_CPPFLAGS, guix_register_LDFLAGS): Remove. * tests/guix-register.sh: Remove.
* store: Remove 'register-path'.Ludovic Courtès2018-06-14
| | | | | | | | * guix/store.scm (register-path): Remove. * guix/nar.scm: Use (guix store database). * guix/scripts/system.scm: Likewise. * tests/store-database.scm: Remove #:hide (register-path). * tests/store.scm ("register-path"): Remove.
* database: 'sqlite-register' takes a database, not a file name.Ludovic Courtès2018-06-14
| | | | | | | | | * guix/store/database.scm (sqlite-register): Remove #:db-file and add 'db' parameter. Remove #:schema and 'parameterize'. (register-path): Wrap 'sqlite-register' call in 'with-database' and in 'parameterize'. * tests/store-database.scm ("new database") ("register-path with unregistered references"): Adjust accordingly.
* deduplicate: Fix a couple of thinkos.Ludovic Courtès2018-06-14
| | | | | | | | | | * guix/store/deduplication.scm (get-temp-link): Turn 'args' in the 'catch' handler into a rest argument. (deduplicate): Use 'lstat' instead of 'file-is-directory?' to properly handle symlinks. When iterating over the result of 'scandir', exclude the ".links" sub-directory. * tests/store-deduplication.scm ("deduplicate"): Create sub-directories and call 'deduplicate' directly on STORE.
* store-copy: 'read-reference-graph' returns a list of records.Ludovic Courtès2018-06-14
| | | | | | | | | | | | | | The previous implementation of 'read-reference-graph' was good enough for many use cases, but it discarded the graph structure, which is useful information in some cases. * guix/build/store-copy.scm (<store-info>): New record type. (read-reference-graph): Rewrite to return a list of <store-info>. (closure-size, populate-store): Adjust accordingly. * gnu/services/base.scm (references-file): Adjust accordingly. * gnu/system/vm.scm (system-docker-image): Likewise. * guix/scripts/pack.scm (squashfs-image, docker-image): Likewise. * tests/gexp.scm ("gexp->derivation #:references-graphs"): Likewise.
* database: Fail registration when encountering unregistered references.Ludovic Courtès2018-06-14
| | | | | | | | | * guix/store/database.scm (add-reference-sql): Remove nested SELECT. (add-references): Expect REFERENCES to be a list of ids. (sqlite-register): Call 'path-id' for each of REFERENCES and pass it to 'add-references'. * tests/store-database.scm ("register-path with unregistered references"): New test.
* database: 'with-database' can now initialize new databases.Ludovic Courtès2018-06-14
| | | | | | | | | | | | | * nix/libstore/schema.sql: Rename to... * guix/store/schema.sql: ... this. * Makefile.am (nobase_dist_guilemodule_DATA): Add it. * nix/local.mk (%D%/libstore/schema.sql.hh): Adjust accordingly. * guix/store/database.scm (sql-schema): New variable. (sqlite-exec, initialize-database, call-with-database): New procedures. (with-database): Rewrite in terms of 'call-with-database'. * tests/store-database.scm ("new database"): New test. * guix/self.scm (compiled-guix)[*core-modules*]: Add 'schema.sql' to #:extra-files.
* packages: Add 'package-patched-vulnerabilities'.Ludovic Courtès2018-06-09
| | | | | | | | | | * guix/packages.scm (patch-file-name): New procedure. (%vulnerability-regexp): New variable. (package-patched-vulnerabilities): New procedure. * guix/scripts/lint.scm (patch-file-name): Remove. (check-vulnerabilities): Adjust to use 'package-patched-vulnerabilities'. * tests/packages.scm ("package-patched-vulnerabilities"): New test.
* tests: Adjust 'guix package' test to "python2" name.Ludovic Courtès2018-06-06
| | | | | | | | This is a followup to a7714d42de2c3082f3609d1e63c83d703fb39cf9, which renamed Python 2.x to "python2". * tests/guix-package.sh: Use g-wrap and guile@2.0 when testing collisions.
* tests: Adjust graph test.Ludovic Courtès2018-06-06
| | | | | | | | This is a followup to 301a4249064227bc4883e4e5b638e85a65925ba0, which added a dependency to sed. * tests/graph.scm ("node-edges"): Use 'hello', not 'sed', as the example of a package without any dependency.
* Merge branch 'master' into core-updatesLudovic Courtès2018-06-01
|\
| * Add (guix store deduplication).Caleb Ristvedt2018-06-01
| | | | | | | | | | | | | | | | | | | | | | | | * guix/store/database.scm (register-path): Add #:deduplicate? and call 'deduplicate' when it's true. (counting-wrapper-port, nar-sha256): Move to... * guix/store/deduplication.scm: ... here. New file. * tests/store-deduplication.scm: New file. * Makefile.am (STORE_MODULES): Add deduplication.scm. (SCM_TESTS) [HAVE_GUILE_SQLITE3]: Add store-deduplication.scm. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
| * Add (gnu store database).Caleb Ristvedt2018-06-01
| | | | | | | | | | | | | | | | | | | | | | * guix/config.scm.in (%store-database-directory): New variable. * guix/store/database.scm: New file. * tests/store-database.scm: New file. * Makefile.am (STORE_MODULES): New variable. (MODULES, MODULES_NOT_COMPILED): Adjust accordingly. (SCM_TESTS) [HAVE_GUILE_SQLITE3]: Add tests/store-database.scm. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
| * gexp: Add 'with-extensions'.Ludovic Courtès2018-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/gexp.scm (<gexp>)[extensions]: New field. (gexp-attribute): New procedure. (gexp-modules): Write in terms of 'gexp-attribute'. (gexp-extensions): New procedure. (gexp->derivation): Add #:effective-version. [extension-flags]: New procedure. Honor extensions of EXP. (current-imported-extensions): New syntax parameter. (with-extensions): New macro. (gexp): Honor CURRENT-IMPORTED-EXTENSIONS. (compiled-modules): Add #:extensions and honor it. (load-path-expression): Likewise. (gexp->script, gexp->file): Honor extensions. * tests/gexp.scm (%extension-package): New variable. ("gexp-extensions & ungexp") ("gexp-extensions & ungexp-splicing") ("gexp-extensions and literal Scheme object") ("gexp->derivation & with-extensions") ("program-file & with-extensions"): New tests. * doc/guix.texi (G-Expressions): Document 'with-extensions'.
| * pack: Adjust test to expect relative symlinks.Ludovic Courtès2018-06-01
| | | | | | | | | | | | | | | | Reported by Chris Marusich <cmmarusich@gmail.com>. Fixes <https://bugs.gnu.org/31560>. * tests/pack.scm ("self-contained-tarball"): Rename 'guile' to 'bin'. Expect 'bin/Guile' to be a relative symlink.
| * tests: Fix arguments in pack test.Ricardo Wurmus2018-06-01
| | | | | | | | | | | | | | This is a follow-up to commit 5ffac538aa604b71814ac74579626f0d3110b96e. * tests/pack.scm (self-contained-tarball): Adjust arguments to "self-contained-tarball".
* | tests: Fix arguments in pack test.Ricardo Wurmus2018-05-30
| | | | | | | | | | | | | | This is a follow-up to commit 5ffac538aa604b71814ac74579626f0d3110b96e. * tests/pack.scm (self-contained-tarball): Adjust arguments to "self-contained-tarball".
* | Merge branch 'master' into core-updatesMark H Weaver2018-05-28
|\ \ | |/
| * system: Remove uses of the 'title' field of <file-system>.Ludovic Courtès2018-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/system/install.scm (installation-os): Remove uses of the 'title' field of 'file-system'; use 'file-system-label' as appropriate. * gnu/system/vm.scm (system-disk-image, system-qemu-image): Likewise. * gnu/tests.scm (%simple-os): Likewise. * gnu/tests/install.scm (%minimal-os, %minimal-extlinux-os) (%minimal-os-on-vda, %separate-home-os, %separate-store-os) (%raid-root-os, %encrypted-root-os, %btrfs-root-os): Likewise. * gnu/build/shepherd.scm (default-mounts)[tmpfs]: Likewise. * tests/guix-system.sh: Likewise. * tests/system.scm (%root-fs): Likewise. ("operating-system-boot-mapped-devices, implicit dependency"): Likewise.
* | Merge branch 'master' into core-updatesMark H Weaver2018-05-24
|\ \ | |/
| * records: Insert record type ABI checks in constructors.Ludovic Courtès2018-05-23
| | | | | | | | | | | | | | | | | | | | | | * guix/records.scm (print-record-abi-mismatch-error): New procedure. <top level>: Add 'set-exception-printer!' call. (current-abi-identifier, abi-check): New procedures. (make-syntactic-constructor): Add #:abi-cookie parameter. Insert calls to 'abi-check'. (define-record-type*)[compute-abi-cookie]: New procedure. Use it and emit a definition of the 'current-abi-identifier' for TYPE. * tests/records.scm ("ABI checks"): New test.
* | Merge branch 'master' into core-updatesMark H Weaver2018-05-21
|\ \ | |/
| * uuid: 'uuid' returns #f when 'string->uuid' returns #f.Ludovic Courtès2018-05-19
| | | | | | | | | | | | * gnu/system/uuid.scm (uuid): When STR is not a literal, return #f when 'string->uuid' returns #f. * tests/uuid.scm ("uuid, dynamic value"): New test.
| * tests: Skip 'tests/guix-pack.sh' when networking is missing.Ludovic Courtès2018-05-19
| | | | | | | | | | | | | | | | The test could fail because "static-binaries.tar.xz" is missing, for instance. * tests/guix-pack.sh: Require a network connection to be on the safe side. This reverts part of 47a60325ca650e8fc1a291c8655b4297f4de8deb.
| * tests: Adjust to new "unbound variable" messages.Ludovic Courtès2018-05-19
| | | | | | | | | | | | This is a followup to 2d2f98efb36db3f003d950a004806234962b4f4d. * tests/guix-system.sh: Adjust regexps to match "error:".
* | Merge branch 'master' into core-updatesMark H Weaver2018-05-17
|\ \ | |/
| * utils: Add 'version-prefix?'.Ludovic Courtès2018-05-13
| | | | | | | | | | * guix/utils.scm (version-prefix?): New procedure. * tests/utils.scm ("version-prefix?"): New test.
| * pack: Add '--relocatable'.Ludovic Courtès2018-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/packages/aux-files/run-in-namespace.c: New file. * Makefile.am (AUX_FILES): Add it. * guix/scripts/pack.scm (<c-compiler>): New record type. (c-compiler, bootstrap-c-compiler, c-compiler-compiler): New procedures. (self-contained-tarball): Use 'relative-file-name' for the SOURCE -> TARGET symlink. (docker-image): Add 'defmod' to please Geiser. (wrapped-package, map-manifest-entries): New procedures. (%options, show-help): Add --relocatable. (guix-pack): Honor it.
| * profiles: Optionally use relative file names for symlink targets.Ludovic Courtès2018-05-10
| | | | | | | | | | | | | | | | | | | | * guix/build/union.scm (symlink-relative): New procedure. * guix/build/profiles.scm: Re-export it. (build-profile): Add #:symlink and pass it to 'union-build'. * guix/profiles.scm (profile-derivation): Add #:relative-symlinks?. Pass #:symlink to 'build-profile'. * tests/profiles.scm ("profile-derivation relative symlinks, one entry") ("profile-derivation relative symlinks, two entries"): New tests.
| * union: Add 'relative-file-name'.Ludovic Courtès2018-05-10
| | | | | | | | | | | | * guix/build/union.scm (%not-slash): New variable. (relative-file-name): New procedure. * tests/union.scm (test-relative-file-name): New macro and tests.
| * guix: Separate the package name and version with "@", not "-".Chris Marusich2018-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/packages.scm (package-full-name): By default, use "@" to separate the package name and package version. Add an optional delimiter argument so that there is still a way to explicitly use a different delimiter. * gnu/packages/commencement.scm (gcc-boot0) <unpack-gmp&co>: Adjust accordingly. * tests/graph.scm: Adjust accordingly. * tests/profiles.scm: Adjust accordingly. * NEWS: Mention the change. Fixes: <https://bugs.gnu.org/31088>. Reported by Pierre Neidhardt <ambrevar@gmail.com>.
* | Merge branch 'master' into core-updatesMark H Weaver2018-05-08
|\ \ | |/
| * pack: Fix handling of '-e'.Ludovic Courtès2018-05-07
| | | | | | | | | | | | | | | | | | | | Fixes a regression introduced in aad16cc1965ab3488449c262455eb29b15c77e95. Reported by Julien Lepiller. * guix/scripts/pack.scm (guix-pack)[manifest-from-args]: In 'match-lambda', add clause for single packages. * tests/guix-pack.sh: Add test for '-e'.
| * pack: Honor package transformation options.Ludovic Courtès2018-05-07
| | | | | | | | | | | | | | | | | | Previously they would silently be ignored. * guix/scripts/pack.scm (guix-pack)[manifest-from-args]: Add 'store' parameter. Call 'options->transformation' and use it. Move 'with-store' and 'parameterize' around the 'let'. * tests/guix-pack.sh: Add test using '--with-source'.
| * pack: Adjust test to cope with GC'd profiles.Ludovic Courtès2018-05-07
| | | | | | | | | | | | | | | | Previous "test -x opt/gnu/bin/guile" would fail if the store item "opt/gnu/bin" points to had been GC'd. * tests/guix-pack.sh: Replace "test -x" with "test -L" to deal with store items that have been reclaimed.
* | Merge branch 'master' into core-updatesMarius Bakke2018-05-06
|\ \ | |/
| * guix build: Nicely report unbound variables with hints.Ludovic Courtès2018-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | * guix/ui.scm (print-unbound-variable-error): Add "error:" to the message. (report-unbound-variable-error): New procedure, with code formerly in 'report-load-error'. (report-load-error): Use it. (call-with-unbound-variable-handling): New procedure. (with-unbound-variable-handling): New macro. * guix/scripts/build.scm (options->derivations): Wrap body in 'with-unbound-variable-handling'. * tests/guix-build.sh (GUIX_PACKAGE_PATH): Add test.
* | Merge branch 'master' into core-updatesMark H Weaver2018-04-30
|\ \ | |/
| * guix system: search: Display default Shepherd service names.Ludovic Courtès2018-04-30
| | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/29707>. Reported by Clément Lassieur <clement@lassieur.org>. * guix/scripts/system/search.scm (service-type-default-shepherd-services) (service-type-shepherd-names): New procedures. (service-type->recutils): Use it. * tests/guix-system.sh: Add test.
* | Merge branch 'master' into core-updatesMark H Weaver2018-04-21
|\ \ | |/
| * guix-daemon: Disable garbage collection for remote connections.Roel Janssen2018-04-19
| | | | | | | | | | | | | | | | * nix/nix-daemon/nix-daemon.cc (isRemoteConnection): New variable. (performOp): For wopCollectGarbage, throw an error when isRemoteConnection is set. (acceptConnection): Set isRemoteConnection when connection is not AF_UNIX. * tests/guix-daemon.sh: Add a test for the new behavior.
* | Merge branch 'master' into core-updatesMark H Weaver2018-04-11
|\ \ | |/
| * gexp: 'scheme-file' can splice expressions.Ludovic Courtès2018-04-11
| | | | | | | | | | | | | | | | | | | | * guix/gexp.scm (<scheme-file>)[splice?]: New field. (scheme-file): Add #:splice? and pass it to '%scheme-file'. (scheme-file-compiler): Pass SPLICE? to 'gexp->file'. (gexp->file): Add #:splice? and honor it. * tests/gexp.scm ("gexp->file + #:splice?"): New test. ("gexp->derivation & with-imported-module & computed module"): Use #:splice? #t.
* | Merge branch 'master' into core-updatesMark H Weaver2018-04-10
|\ \ | |/
| * union: Allow callers to choose the collision resolution policy.Ludovic Courtès2018-04-08
| | | | | | | | | | | | | | * guix/build/union.scm (warn-about-collision): New procedure. (union-build): Add #:resolve-collision. [resolve-collisions]: Call it. * tests/union.scm ("union-build collision first & last"): New test.
| * tests: Skip 'pivot-root' test on Ubuntu's 4.4 kernels.Ludovic Courtès2018-04-08
| | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/25476>. Reported by Paul Garlick <pgarlick@tourbillion-technology.com> and Maria Sidorova <hydromasha@gmail.com>. * tests/syscalls.scm ("pivot-root"): Skip on known-bad Ubuntu kernels.