~ruther/guix-local

ref: 5a659a489ef8ffe708f4e24c65cf6ae5200e059a guix-local/tests d---------
847391fe — nebuli 11 years ago
guix: scripts: Parse $GUIX_BUILD_OPTIONS separately.

Appending to "raw" args broke optional parameters in 'guix package -I'
and 'guix package -A', and possibly other places.  Therefore, switch to
parsing each set of options on its own and append resulting alists
together afterwards.

* guix/scripts/archive.scm (parse-options-from): Rename from
  (parse-options) and add explicit argument.  New form of (parse-options)
  using its old algorithm via -from function.
* guix/scripts/build.scm: Ditto.
* guix/scripts/environment.scm: Ditto.
* guix/scripts/package.scm: Ditto.
* guix/scripts/system.scm: Ditto.
* tests/guix-package.sh: Add test.
* doc/guix.texi (Invoking guix build): Make it clear that the options
  are parsed independently.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
16eb115e — nebuli 11 years ago
guix: scripts: Add GUIX_BUILD_OPTIONS environment handling.

* doc/guix.texi (Invoking guix build): Mention 'GUIX_BUILD_OPTIONS'.
* guix/scripts/archive.scm: (append args (environment-build-options)).
* guix/scripts/build.scm: Ditto.
* guix/scripts/environment.scm: Ditto.
* guix/scripts/package.scm: Ditto.
* guix/scripts/system.scm: Ditto.
* guix/ui.scm (environment-build-options): New function.
* guix/utils.scm (arguments-from-environment-variable): New function.
* tests/guix-build.sh: Add tests.
* test-env.in: Unset GUIX_BUILD_OPTIONS.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
ccea821b — Ludovic Courtès 11 years ago
syscalls: Add 'mount-points'.

* guix/build/syscalls.scm (mount-points): New procedure.
* tests/syscalls.scm ("mount-points"): New test.
15a6d433 — Ludovic Courtès 11 years ago
lint: Allow synopses that start with an abbreviation.

* guix/scripts/lint.scm (starts-with-abbreviation?): New procedure.
  (check-synopsis-style)[check-start-with-package-name]: Use it.
* tests/lint.scm ("synopsis: start with abbreviation"): New test.
17854ef9 — Ludovic Courtès 11 years ago
lint: Improve check for synopses starting with package name.

* guix/scripts/lint.scm (package-name-regexp): New procedure.
  (check-synopsis-style)[check-start-with-package-name]: Use it instead
  of 'string-prefix-ci?'.
* tests/lint.scm ("synopsis: start with package name prefix"): New test.
b1e66683 — Ludovic Courtès 11 years ago
lint: Simplify no-warnings tests.

* tests/lint.scm ("description: may start with a digit"): Replace
  (not (string-contains exp str)) with (string-null? exp).
  ("description: may start with lower-case package name"): Likewise.
  ("description: end-of-sentence detection with abbreviations"):
  Likewise.
  ("synopsis: may start with a digit"): Likewise.
  ("synopsis: ends with 'etc.'"): Likewise.
c8af8572 — Ludovic Courtès 11 years ago
tests: Avoid Bash extension in 'tests/guix-lint.sh'.

* tests/guix-lint.sh: Remove redundant and non-portable 'export'.
834ea02a — Ludovic Courtès 11 years ago
tests: When a store item is to be deleted, make it statistically unique.

Fixes <http://bugs.gnu.org/18935>.
Reported by Mark H Weaver <mhw@netris.org>.

Previously, if tests/nar.scm ran concurrently with tests/gexp.scm, the
store item "foo" containing the string "Hello, world!" could be
deleted (via 'delete-paths') from the tests/nar.scm daemon while the
tests/gexp.scm daemon would still consider it live.

* tests/nar.scm ("restore-file-set (missing signature)"):
  Use (random-text) rather than "Hello, world!", to avoid concurrent
  deletion of store item "foo" used in tests/gexp.scm.
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.
c37a74bd — Ludovic Courtès 11 years ago
packages: 'package-transitive-supported-systems' accounts for indirect deps.

Reported by Andreas Enge <andreas@enge.fr>.

* guix/packages.scm (first-value): New macro.
  (package-transitive-supported-systems): Rewrite to traverse all the
  DAG rooted at PACKAGE.
* tests/packages.scm ("package-transitive-supported-systems"): Add 'd'
  and 'e', and test them.
05962f29 — Ludovic Courtès 11 years ago
packages: Implement grafts.

Thanks to Mark H. Weaver <mhw@netris.org> for insightful discussions
and suggestions.

* guix/packages.scm (<package>)[graft]: New field.
  (patch-and-repack): Invoke 'package-derivation' with #:graft? #f.
  (package-source-derivation): Likewise.  Do not use (%guile-for-build)
  in call to 'patch-and-repack', and we could end up using a grafted
  Guile.
  (expand-input): Likewise, also for 'package-cross-derivation' call.
  (package->bag): Add #:graft? parameter.  Honor it.  Use 'strip-append'
  instead of 'package-full-name'.
  (input-graft, input-cross-graft, bag-grafts, package-grafts): New
  procedures.
  (package-derivation, package-cross-derivation): Add #:graft? parameter
  and honor it.
* gnu/packages/bootstrap.scm (package-with-bootstrap-guile): Add
  recursive call on 'graft'.
* guix/build-system/gnu.scm (package-with-explicit-inputs,
  package-with-extra-configure-variable, static-package): Likewise.
  (gnu-build): Use the ungrafted Guile to avoid full rebuilds.
  (gnu-cross-build): Likewise.
* guix/build-system/cmake.scm (cmake-build): Likewise.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Likewise.
* guix/build-system/perl.scm (perl-build): Likewise.
* guix/build-system/python.scm (python-build): Likewise.
* guix/build-system/ruby.scm (ruby-build): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Likewise.
* tests/packages.scm ("package-derivation, direct graft",
  "package-cross-derivation, direct graft", "package-grafts,
  indirect grafts", "package-grafts, indirect grafts, cross",
  "package-grafts, indirect grafts, propagated inputs",
  "package-derivation, indirect grafts"): New tests.
  ("bag->derivation", "bag->derivation, cross-compilation"): Wrap in
  'parameterize'.
* doc/guix.texi (Security Updates): New node.
  (Invoking guix build): Document --no-graft.
50373bab — Ludovic Courtès 11 years ago
packages: Add 'package->bag' test for propagated inputs.

* tests/packages.scm ("package->bag, propagated inputs"): New test.
e786293e — Ludovic Courtès 11 years ago
derivations: Add 'derivation-name'.

* guix/derivations.scm (derivation-name): New procedure.
* tests/derivations.scm ("derivation-name"): New test.
d2d0514b — Ludovic Courtès 11 years ago
derivations: Fix 'derivation-prerequisites-to-build' when #:local-build?.

* guix/derivations.scm (derivation-prerequisites-to-build)[derivation-substitutable?]:
  Call 'substitutable-derivation?'.
  <body>: When 'substitutable-derivation?' returns #f, add DRV to BUILD.
e6740741 — Ludovic Courtès 11 years ago
tests: Move some of the narinfo test tools to (guix tests).

* guix/tests.scm (derivation-narinfo, call-with-derivation-narinfo): New
  procedures.
  (with-derivation-narinfo): New macro.
* tests/derivations.scm ("derivation-prerequisites-to-build and
  substitutes"): Use them.
fc93e309 — Ludovic Courtès 11 years ago
derivations: Add 'offloadable-derivation?' and 'substitutable-derivation?'.

* guix/derivations.scm (offloadable-derivation?,
  substitutable-derivation?): New procedures.
* tests/derivations.scm ("offloadable-derivation?"): New test.
791e0126 — Eric Bavier 11 years ago
build: Adjust lint tests for latest rules.

* tests/guix-lint.sh (dummy)[description]: Add failing case.
  [doc]: Adjust.
3c42965b — Eric Bavier 11 years ago
guix: lint: Make exception for package name starting description.

* guix/scripts/lint.scm (check-description-style): Exception for
  upper-case rule if the description starts with the package name.
* tests/lint.scm: Test it.
903581f9 — Eric Bavier 11 years ago
guix: lint: Allow digits at start of synopsis or description.

* guix/scripts/lint.scm (start-with-capital-letter?): Rename too...
  (properly-starts-sentence?): Rewrite with regex and add digits.
  (check-description-style, check-synopsis-style): Use it.
* tests/lint.scm: Add tests.
334c43e3 — Eric Bavier 11 years ago
guix: lint: Check for empty synopses and descriptions.

* guix/scripts/lint.scm (check-description-style,
  check-synopsis-style): New emptiness checks.
* tests/lint.scm: Test them.
Next