~ruther/guix-local

ref: e5ffe52cc7d0fa3242e3cd11f63c94deab91a3d5 guix-local/tests/store.scm -rw-r--r-- 25.6 KiB
ce72c780 — Ludovic Courtès 11 years ago
store: Attempt to decode build logs as UTF-8.

* guix/serialization.scm (read-maybe-utf8-string): New procedure.
* guix/store.scm (process-stderr): Use it for the build log and errors.
* tests/store.scm ("current-build-output-port, UTF-8",
  "current-build-output-port, UTF-8 + garbage"): New tests.
5f1f10c5 — Ludovic Courtès 11 years ago
tests: Don't dump the list of dead items in the test log.

* tests/store.scm ("dead-paths"): Wrap result in '->bool'.
abac874b — Ludovic Courtès 11 years ago
store: Add 'build-things'.

* guix/store.scm (operation-id): Rename 'build-derivations' to
  'build-things', as per Nix commit 1aba0bf0.
  (build-derivations): Rename to...
  (build-things): ... this.  Keep 'build-derivations' as an alias.
  (build): New procedure.
* tests/store.scm ("build-things with output path",
  "substitute + build-things with output path"): New tests.
e6c8839c — Ludovic Courtès 11 years ago
tests: Add 'with-derivation-substitute' and use it.

* guix/tests.scm (%substitute-directory): New variable.
  (call-with-derivation-narinfo): Use it.
  (call-with-derivation-substitute): New procedure.
  (with-derivation-substitute): New macro.
* tests/store.scm ("substitute"): Use 'with-derivation-substitute'.
  ("substitute, corrupt output hash"): Likewise.
6eebbab5 — Ludovic Courtès 11 years ago
tests: Further factorize substitute mocks.

* guix/tests.scm (derivation-narinfo): Turn 'nar' into a keyword
  parameter.  Add #:sha256 parameter, and honor it.
  (call-with-derivation-narinfo): Add #:sha256 and pass it to
  'derivation-narinfo'.
  (with-derivation-narinfo): Extend with support for (sha256 => value).
* tests/store.scm ("substitute query"): Use 'with-derivation-narinfo'.
  ("substitute"): Likewise.
  ("substitute, corrupt output hash"): Likewise.
  ("substitute --fallback"): Likewise.
* tests/derivations.scm: Remove Emacs local variable.
2d53df66 — Ludovic Courtès 11 years ago
tests: Use 'with-store' as appropriate.

* tests/store.scm ("no substitutes", "substitute query",
  "substitute", "substitute, corrupt output hash",
  "substitute --fallback"): Use 'with-store' instead of
  'open-connection'.
5b3d863f — Ludovic Courtès 11 years ago
store: Add #:recursive? parameter to 'export-paths'.

* guix/store.scm (export-paths): Add #:recursive? parameter and honor
  it.
* tests/store.scm ("export/import incomplete", "export/import
  recursive"): New tests.
023d9892 — Ludovic Courtès 11 years ago
store: Add 'store-lower'.

* guix/store.scm (store-lower): New procedure.
* tests/store.scm ("store-lower"): New test.
000c59b6 — Ludovic Courtès 11 years ago
store: Invalidate caches once GC has run.

* guix/store.scm (run-gc): Add calls to 'hash-clear!'.
* tests/store.scm ("add-text-to-store vs. delete-paths",
  "add-to-store vs. delete-paths"): New tests.
0363991a — Ludovic Courtès 11 years ago
Break module cycle involving (guix store) and (guix ui).

Before, there was a cycle along the lines of:

  (guix store) -> (guix nar) -> (guix ui) -> (guix store)

This caused problems, as discussed at:

  http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00109.html

This patch removes cycles in the (guix ...) modules.

* guix/nar.scm (&nar-error, &nar-read-error, dump, write-contents,
  read-contents, %archive-version-1, write-file, restore-file): Move to...
* guix/serialization.scm: ... here.
* guix/store.scm: Remove dependency on (guix nar).
* guix/scripts/hash.scm, guix/scripts/offload.scm,
  guix/scripts/substitute-binary.scm, tests/nar.scm, tests/store.scm,
  tests/substitute-binary.scm: Adjust accordingly.
ce3e35ed — Mark H Weaver 11 years ago
Merge branch 'master' into core-updates
c1bc358f — Ludovic Courtès 11 years ago
Factorize test suite support in (guix tests).

* guix/tests.scm: New file.
* Makefile.am (noinst_DATA): New variable.
  (GOBJECTS): Add guix/tests.go.
* tests/builders.scm (%store): Use 'open-connection-for-tests'
  from (guix tests).
* tests/derivations.scm: Likewise.
* tests/monads.scm: Likewise.
* tests/packages.scm: Likewise.
* tests/profiles.scm: Likewise.
* tests/union.scm: Likewise.
* tests/gexp.scm: Likewise.
  (guile-for-build): Remove.  Use (%guile-for-build) instead.
* tests/nar.scm (make-random-bytevector, %seed, random-text): Remove.
  (populate-file): Change 'make-random-bytevector' to 'random-bytevector'.
  Use (guix tests).
* tests/store.scm (%seed, random-text): Remove.
  Use (guix tests).
af018f5e — Ludovic Courtès 11 years ago
Merge branch 'master' into core-updates
eee21271 — Ludovic Courtès 12 years ago
store: (direct-store-path? (%store-prefix)) returns #f.

* guix/store.scm (direct-store-path?): Return #f if PATH
  is (%store-prefix).
* tests/store.scm ("direct-store-path?"): Add test.
a9d2a105 — Ludovic Courtès 12 years ago
store: Add 'add-permanent-root' and 'remove-permanent-root'.

* guix/store.scm (add-indirect-root): Improve docstring.
  (%gc-roots-directory): New variable.
  (add-permanent-root, remove-permanent-root): New procedures.
* tests/store.scm ("permanent root"): New test.
491e6de7 — Ludovic Courtès 12 years ago
tests: Make sure the daemon reports substitute hash mismatches.

* tests/store.scm ("substitute, corrupt output hash"): New test.
1eefbb26 — Mark H Weaver 12 years ago
Merge branch 'master' into core-updates
e297d8fc — Ludovic Courtès 12 years ago
tests: Test recovery from 'valid-path?' RPCs with an invalid parameter.

* tests/store.scm ("valid-path? live", "valid-path? false", "valid-path?
  error", "valid-path? recovery"): New tests.
0562dbe5 — Ludovic Courtès 12 years ago
Merge branch 'master' into core-updates
11e7a6cf — Ludovic Courtès 12 years ago
store: Add 'hash-part->path'.

* guix/store.scm (hash-part->path): New procedure.
* tests/store.scm ("hash-part->path"): New test.
Next