~ruther/guix-local

ref: d3e80ec2c5274792fea33c0b06f6b24b75d1e97e guix-local/tests d---------
6d2b4391 — Ludovic Courtès 10 years ago
syscalls: 'terminal-columns' ignores non-file ports.

* guix/build/syscalls.scm (terminal-columns): Call
'terminal-window-size' only when PORT is a file port.
* tests/syscalls.scm ("terminal-columns non-file port"): New test.
29ff6d9f — Ludovic Courtès 10 years ago
syscalls: Add TIOCGWINSZ bindings.

* guix/build/syscalls.scm (TIOCGWINSZ): New macro.
(<window-size>): New record type.
(winsize): New C struct.
(winsize-struct): New variable.
(terminal-window-size, terminal-columns): New procedures.
50a3d594 — 宋文武 10 years ago
utils: Add 'edit-expression'.

* guix/utils.scm (edit-expression): New procedure.
* tests/utils.scm (edit-expression): New test.
a9edb211 — Mathieu Lirzin 10 years ago
build: Add a Guile custom test driver using SRFI-64.

Before that '.log' files for scheme tests were fragmented and not
included in test-suite.log.  This unifies the semantics of SRFI-64 API
with Automake test suite.

* build-aux/test-driver.scm: New file.
* Makefile.am (SCM_LOG_DRIVER, AM_SCM_LOG_DRIVER_FLAGS): New variables.
(SCM_LOG_COMPILER, AM_SCM_LOG_FLAGS): Delete variables.
(AM_TESTS_ENVIRONMENT): Set GUILE_AUTO_COMPILE to 0.
* test-env.in: Silence guix-daemon.
* doc/guix.texi (Running the Test Suite): Describe how to display the
detailed results.  Bug reports require only 'test-suite.log' file.
* tests/base32.scm, tests/build-utils.scm, tests/builders.scm,
tests/challenge.scm, tests/cpan.scm, tests/cpio.scm, tests/cran.scm,
tests/cve.scm, tests/derivations.scm, tests/elpa.scm,
tests/file-systems.scm, tests/gem.scm, tests/gexp.scm,
tests/gnu-maintenance.scm, tests/grafts.scm, tests/graph.scm,
tests/gremlin.scm, tests/hackage.scm, tests/hash.scm,
tests/import-utils.scm, tests/lint.scm, tests/monads.scm, tests/nar.scm,
tests/packages.scm, tests/pk-crypto.scm, tests/pki.scm,
tests/profiles.scm, tests/publish.scm, tests/pypi.scm,
tests/records.scm, tests/scripts-build.scm, tests/scripts.scm,
tests/services.scm, tests/sets.scm, tests/size.scm, tests/snix.scm,
tests/store.scm, tests/substitute.scm, tests/syscalls.scm,
tests/system.scm, tests/ui.scm, tests/union.scm, tests/upstream.scm,
tests/utils.scm: Don't exit at the end of test groups.
* tests/containers.scm: Likewise.  Use 'test-skip' instead of exiting
with error code 77.
13bc8d5e — David Thompson 10 years ago
environment: Properly handle SIGINT.

Switching to execlp means that the process spawned in a container is PID
1, which obsoleted one of the 'guix environment --container' tests
because the init process can't be killed in the usual manner.

* guix/scripts/environment.scm (launch-environment/fork): New procedure.
(launch-environment): Switch from system* to execlp.  Add handler for
SIGINT.
(guix-environment): Use launch-environment/fork.
* tests/guix-environment-container.sh: Replace abnormal exit test with
one that works now that the spawned process is PID 1.
7adbe85e — Ludovic Courtès 10 years ago
syscalls: 'interface-address' can return #f.

Fixes <http://bugs.gnu.org/22612>.
Reported by Danny Milosavljevic <dannym@scratchpost.org>.

* tests/syscalls.scm ("network-interfaces returns one or more
interfaces"): Accept 'interface-address' value of #f.
9a2a2005 — Ludovic Courtès 10 years ago
guix build: '--with-source' correctly matches versioned file names.

* guix/scripts/build.scm: Use the right 'package-name->name+version'
procedure.  Fixes a regression introduced in
1b846da8c372bee78851439fd9e72b2499115e5a.
* tests/scripts-build.scm ("options->transformation, with-source, with
version"): New test.
d26e1967 — Ludovic Courtès 10 years ago
derivations: Raise an error when a module file is not found.

Suggested by Jookia.

* guix/derivations.scm (&file-search-error): New error condition.
(search-path*): Raise it when 'search-path' returns #f.
* guix/gexp.scm (search-path*): Remove.
* guix/ui.scm (call-with-error-handling): Add case for
'file-search-error?'.
* tests/derivations.scm ("build-expression->derivation and invalid
module name"): New test.
3f4ecf32 — Ludovic Courtès 10 years ago
gexp: Add #:disallowed-references.

* guix/gexp.scm (gexp->derivation): Add #:disallowed-references and
honor it.
* tests/gexp.scm ("gexp->derivation #:disallowed-references, allowed")
("gexp->derivation #:disallowed-references"): New tests.
* doc/guix.texi (G-Expressions): Adjust accordingly.
35b5ca78 — Ludovic Courtès 10 years ago
derivations: Add #:disallowed-references.

* guix/derivations.scm (derivation): Add #:disallowed-references.
[user+system-env-vars]: Honor it.
(build-expression->derivation): Likewise.
* tests/derivations.scm ("derivation #:disallowed-references, ok")
("derivation #:disallowed-references, not ok"): New tests.
* doc/guix.texi (Derivations): Adjust accordingly.
522773b7 — Ludovic Courtès 10 years ago
import: pypi: Emit 'pypi-uri' only when it yields the right URL.

Fixes <http://bugs.gnu.org/23062>.
Reported by Danny Milosavljevic <dannym@scratchpost.org>.

* guix/import/pypi.scm (make-pypi-sexp): Check whether 'pypi-uri'
returns SOURCE-URL and fall back to the full URL otherwise.
* tests/pypi.scm ("pypi->guix-package"): Adjust expected URI
accordingly.

Co-authored-by: Danny Milosavljevic <dannym@scratchpost.org>
71e2065a — Ludovic Courtès 10 years ago
substitute: Honor client-provided empty URL list.

Before that, 'guix build --substitute-urls=""' would lead to using the
daemon's own URL list instead of the empty list.  The 'or*' hack, which
is to blame, had become unnecessary since commit
fb4bf72be3fbc23bca35ba4b842b7e1517ef0e3a.

Reported by Mark H Weaver <mhw@netris.org>.

* guix/scripts/substitute.scm (or*): Remove.
(%cache-urls): Use 'or' instead of 'or*'.
* tests/store.scm ("substitute query, alternating URLs"): Add test with
empty URL list.
* doc/guix.texi (Common Build Options): Mention the empty string.
f1eacbaf — Ludovic Courtès 10 years ago
upstream: Fix 'signature-urls' coalescing.

Previously, the resulting 'signature-urls' would contain N times the
same URL.

* guix/upstream.scm (coalesce-sources): Fix TWO in 'signature-urls'.
* tests/upstream.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
efb107e0 — Ludovic Courtès 10 years ago
packages: Gracefully report packages not found.

Fixes a thinko introduced in 1b846da8c372bee78851439fd9e72b2499115e5a
that would lead to a backtrace when looking for an unknown package.

* gnu/packages.scm (%find-package): Correct logic when checking for
FALLBACK?.
95cd4971 — Ludovic Courtès 10 years ago
packages: Support the deprecated "NAME-VERSION" syntax.

Fixes a typo introduced in 1b846da8c372bee78851439fd9e72b2499115e5a that
would lead to a backtrace when using the deprecated syntax.

* gnu/packages.scm (%find-package): Turn the first argument to
'call-with-values' into a thunk.  Use #:select instead of '@' to select
the right 'package-name->name+version' procedure.
ef8de985 — Ludovic Courtès 10 years ago
tests: Disable grafting by default for most tests.

This allows tests to run as expected even in the presence of
replacements among the bootstrap packages, such as Perl (commit
d8173f21f7b4e3cb83541b8fa70621d2b6d4ce1c).

* tests/cpan.scm: Add (%graft? #f).
* tests/derivations.scm: Likewise.
* tests/graph.scm: Likewise.
* tests/monads.scm: Likewise.
* tests/profiles.scm: Likewise.
* tests/gexp.scm: Likewise.
("gexp->derivation vs. grafts"): Explicitly reenable grafting before,
and disable it after, using 'set-grafting'.
b4c42a4b — Ludovic Courtès 10 years ago
tests: Disable tests that would rebuild the world due to grafting.

The Perl replacement added in d8173f2 leads some tests to involve
grafting, which in turn triggers derivation builds that rebuild the
world.  Work around that.

* tests/packages.scm: Add call to '%graft?'.
("package-derivation, direct graft")
("package-cross-derivation, direct graft"): Comment out.
fcadd9ff — Ludovic Courtès 10 years ago
packages: The result of 'bag-grafts' does not contain duplicates.

* guix/packages.scm (bag-grafts): Add call to 'delete-duplicates'.
6581ec9a — Ludovic Courtès 10 years ago
store: Add 'references/substitutes'.

* guix/store.scm (references/substitutes): New procedure.
* tests/store.scm ("references/substitutes missing reference info")
("references/substitutes with substitute info"): New tests.
94d609ab — Ludovic Courtès 10 years ago
guix build: -S returns the replacement's source.

Reported by Mark H Weaver.

* guix/scripts/build.scm (options->derivations): When SRC and GRAFT? are
true, use the source of P's replacement.
* tests/guix-build.sh: Add test.
Next