guix-devel/tests
Ludovic Courtès 81c3dc3224
maint: Switch to Guile-JSON 3.x.
Guile-JSON 3.x is incompatible with Guile-JSON 1.x, which we relied on
until now: it maps JSON dictionaries to alists (instead of hash tables),
and JSON arrays to vectors (instead of lists).  This commit is about
adjusting all the existing code to this new mapping.

* m4/guix.m4 (GUIX_CHECK_GUILE_JSON): New macro.
* configure.ac: Use it.
* doc/guix.texi (Requirements): Mention the Guile-JSON version.
* guix/git-download.scm (git-fetch)[guile-json]: Use GUILE-JSON-3.
* guix/import/cpan.scm (string->license): Expect vectors instead of
lists.
(module->dist-name): Use 'json-fetch' instead of 'json-fetch-alist'.
(cpan-fetch): Likewise.
* guix/import/crate.scm (crate-fetch): Likewise, and call 'vector->list'
for DEPS.
* guix/import/gem.scm (rubygems-fetch): Likewise.
* guix/import/json.scm (json-fetch-alist): Remove.
* guix/import/pypi.scm (pypi-fetch): Use 'json-fetch' instead of
'json-fetch-alist'.
(latest-source-release, latest-wheel-release): Call 'vector->list' on
RELEASES.
* guix/import/stackage.scm (stackage-lts-info-fetch): Use 'json-fetch'
instead of 'json-fetch-alist'.
(lts-package-version): Use 'vector->list'.
* guix/import/utils.scm (hash-table->alist): Remove.
(alist->package): Pass 'vector->list' on the inputs fields, and default
to the empty vector.
* guix/scripts/import/json.scm (guix-import-json): Remove call to
'hash-table->alist'.
* guix/swh.scm (define-json-reader): Expect pair? or null? instead of
hash-table?.
[extract-field]: Use 'assoc-ref' instead of 'hash-ref'.
(json->branches): Use 'map' instead of 'hash-map->list'.
(json->checksums): Likewise.
(json->directory-entries, origin-visits): Call 'vector->list' on the
result of 'json->scm'.
* tests/import-utils.scm ("alist->package with dependencies"): New test.
* gnu/installer.scm (build-compiled-file)[builder]: Use GUILE-JSON-3.
* gnu/installer.scm (installer-program)[installer-builder]: Likewise.
* gnu/installer/locale.scm (iso639->iso639-languages): Use 'assoc-ref'
instead of 'hash-ref', and pass vectors through 'vector->list'.
(iso3166->iso3166-territories): Likewise.
* gnu/system/vm.scm (system-docker-image)[build]: Use GUILE-JSON-3.
* guix/docker.scm (manifest, config): Adjust for Guile-JSON 3.
* guix/scripts/pack.scm (docker-image)[build]: Use GUILE-JSON-3.
* guix/import/github.scm (fetch-releases-or-tags): Update docstring.
(latest-released-version): Use 'assoc-ref' instead of 'hash-ref'.  Pass
the result of 'fetch-releases-or-tags' to 'vector->list'.
* guix/import/launchpad.scm (latest-released-version): Likewise.
2019-07-25 00:16:41 +02:00
..
accounts.scm tests: Adjust accounts test to shell-as-config change. 2019-04-27 16:30:40 +02:00
base16.scm utils: Move base16 procedures to (guix base16). 2017-03-16 22:50:14 +01:00
base32.scm Switch to Guile-Gcrypt. 2018-09-04 17:25:11 +02:00
base64.scm substitute-binary: Support the Signature field of a narinfo file. 2014-03-30 12:02:10 +02:00
bournish.scm bournish: Extend 'rm' command. 2017-01-26 13:49:56 +01:00
build-utils.scm booloader: Add 'invoke/quiet'. 2019-03-16 18:15:13 +01:00
builders.scm Switch to Guile-Gcrypt. 2018-09-04 17:25:11 +02:00
cache.scm cache: Work around 'time-monotonic' bug in Guile 2.2.2. 2017-04-22 14:42:15 +02:00
challenge.scm tests: Add 'test-assertm' to (guix tests). 2018-11-12 23:37:13 +01:00
channels.scm channels: Always provide a <channel-metadata> record. 2019-07-19 11:53:47 +02:00
combinators.scm utils: Move combinators to (guix combinators). 2016-05-04 23:35:55 +02:00
containers.scm linux-container: Add 'eval/container'. 2019-07-19 11:53:47 +02:00
cpan.scm Switch to Guile-Gcrypt. 2018-09-04 17:25:11 +02:00
cpio.scm build: Add a Guile custom test driver using SRFI-64. 2016-04-03 14:19:09 +02:00
cran.scm import: cran: Robustify cran-package?. 2017-05-13 12:40:20 +02:00
crate.scm guix: import: crate: fix redundant inputs list nesting 2019-06-30 09:01:27 -07:00
cve-sample.xml Add (guix cve). 2015-11-26 22:35:01 +01:00
cve.scm cve: Use a more compact format for the list of package/versions. 2016-05-28 01:07:12 +02:00
debug-link.scm tests: Add 'test-assertm' to (guix tests). 2018-11-12 23:37:13 +01:00
derivations.scm derivations: Update tests to use new calling convention. 2019-07-15 10:01:05 +02:00
discovery.scm discovery: Recurse into directories pointed to by a symlink. 2017-07-03 23:51:23 +02:00
elpa.scm tests: elpa: Don't actually download files. 2018-03-18 22:33:41 +01:00
file-systems.scm uuid: Move tests to 'tests/uuid.scm'. 2017-09-14 00:10:13 +02:00
gem.scm Switch to Guile-Gcrypt. 2018-09-04 17:25:11 +02:00
gexp.scm gexp: 'lowered-gexp-guile' now returns a <derivation-input>. 2019-07-15 10:01:05 +02:00
glob.scm glob: Add an extra glob pattern compilation stage. 2018-03-18 22:57:17 +01:00
gnu-maintenance.scm build: Add a Guile custom test driver using SRFI-64. 2016-04-03 14:19:09 +02:00
grafts.scm derivations: Add 'derivation-input'. 2019-06-27 11:14:41 +02:00
graph.scm graph: Add the 'reverse-bag' graph. 2019-03-23 18:15:36 +01:00
gremlin.scm gremlin: Adjust tests for foreign distros. 2019-05-18 12:10:15 +02:00
guix-archive.sh guix archive: Add '--extract'. 2015-10-19 10:10:47 +02:00
guix-authenticate.sh authenticate: Allow signatures with binary data to be written to stdout. 2014-04-22 11:30:58 +02:00
guix-build-branch.sh git: Nicely report '--with-commit' errors. 2018-11-30 17:03:04 +01:00
guix-build.sh ui: 'warn-about-load-error' provides hints for unbound variables. 2019-07-20 01:32:17 +02:00
guix-daemon.sh tests: Avoid TCP port collision between lint.scm and guix-daemon.sh. 2019-06-27 11:14:42 +02:00
guix-describe.sh Add 'guix describe'. 2018-09-07 11:40:22 +02:00
guix-download.sh guix download: Support retrieving local file without the URI scheme. 2017-08-20 20:55:45 +08:00
guix-environment-container.sh environment: '-C' creates namespaces where the user is not root. 2019-04-02 18:15:37 +02:00
guix-environment.sh scripts: environment: Add --no-cwd. 2019-07-08 10:33:20 -04:00
guix-gc.sh guix gc: Add '--list-roots'. 2019-04-10 17:09:47 +02:00
guix-graph.sh graph: Allow store file names for 'derivation' and 'references' graphs. 2016-05-21 01:35:14 +02:00
guix-hash.sh guix hash: Interpret '-' as standard input. 2016-10-28 22:30:17 +02:00
guix-lint.sh tests: Do not run 'cve' checker in 'tests/guix-lint.sh'. 2016-05-24 14:45:18 +02:00
guix-pack-localstatedir.sh pack: '--localstatedir' and '-R' tests gracefully handle missing /gnu/store. 2019-05-18 12:23:31 +02:00
guix-pack-relocatable.sh pack: '--localstatedir' and '-R' tests gracefully handle missing /gnu/store. 2019-05-18 12:23:31 +02:00
guix-pack.sh pack: Add '--root'. 2019-05-22 00:09:41 +02:00
guix-package-aliases.sh guix package: Add 'guix search' alias. 2019-04-29 12:19:24 +02:00
guix-package-net.sh guix package: '--upgrade' preserves package order. 2019-01-15 12:05:25 +01:00
guix-package.sh discovery: 'all-modules' returns modules in path order. 2019-05-26 23:02:02 +02:00
guix-system.sh tests: Adjust wildcard when testing OS examples. 2019-04-29 21:57:52 +02:00
hackage.scm import: hackage: Add two expected failing test cases. 2019-06-20 14:07:01 +02:00
import-utils.scm maint: Switch to Guile-JSON 3.x. 2019-07-25 00:16:41 +02:00
inferior.scm inferior: Add 'inferior-available-packages'. 2019-02-12 23:30:16 +01:00
lint.scm lint: Add test for 'source'. 2019-07-20 01:32:17 +02:00
lzlib.scm lzlib: Add 'make-lzip-input-port/compressed'. 2019-05-27 22:47:24 +02:00
modules.scm modules: Raise an error when a dependency could not be found. 2017-05-25 14:25:17 +02:00
monads.scm build: Add a Guile custom test driver using SRFI-64. 2016-04-03 14:19:09 +02:00
nar.scm serialization: 'restore-file' errors out upon non-convertible file names. 2019-01-18 17:51:34 +01:00
opam.scm import: opam: Fix conditions. 2019-02-05 22:33:06 +01:00
pack.scm tests: Adjust 'guix pack -f squashfs' test. 2019-03-24 00:13:53 +01:00
packages.scm packages: 'specification->package+output' distinguishes "no output specified". 2019-06-27 11:14:41 +02:00
pki.scm Switch to Guile-Gcrypt. 2018-09-04 17:25:11 +02:00
print.scm import: print: Honor the outputs of inputs (!). 2019-06-07 22:49:47 +02:00
processes.scm Add 'guix processes'. 2018-10-29 00:13:38 +01:00
profiles.scm profiles: Raise an error for unmatched patterns. 2019-02-07 15:46:45 +01:00
publish.scm publish: '--compression' can be repeated. 2019-06-02 22:01:57 +02:00
pypi.scm import: pypi: Include optional test inputs as native-inputs. 2019-07-02 10:08:00 +09:00
records.scm records: Support custom 'this' identifiers. 2019-03-30 11:08:39 +01:00
scripts-build.scm guix build: '--with-commit' makes recursive checkouts. 2019-03-17 22:55:01 +01:00
scripts.scm tests: Add missing import. 2019-03-24 00:13:53 +01:00
search-paths.scm tests: Adjust search-paths test following the introduction of aarch64. 2017-04-04 00:10:00 +02:00
services.scm tests: Remove duplicate field initializers. 2019-01-24 20:47:21 +01:00
sets.scm build: Add a Guile custom test driver using SRFI-64. 2016-04-03 14:19:09 +02:00
signing-key.pub daemon: Implement signed archive import/export. 2013-12-20 17:17:42 +01:00
signing-key.sec daemon: Implement signed archive import/export. 2013-12-20 17:17:42 +01:00
size.scm tests: Add 'test-assertm' to (guix tests). 2018-11-12 23:37:13 +01:00
snix.scm build: Add a Guile custom test driver using SRFI-64. 2016-04-03 14:19:09 +02:00
status.scm status: Keep track of the current build phase. 2019-02-05 12:03:25 +01:00
store-database.scm database: Reset timestamps to one second after the Epoch. 2018-07-20 15:01:33 +02:00
store-deduplication.scm deduplication: Gracefully handle ENOSPC raised by 'link' calls. 2018-12-14 12:07:24 +01:00
store-roots.scm Add (guix store roots). 2019-04-10 17:09:47 +02:00
store.scm store: 'build-things' accepts derivation/output pairs. 2019-06-10 22:42:59 +02:00
substitute.scm substitute: Select the best compression methods. 2019-06-02 22:01:57 +02:00
swh.scm swh: Add basic tests. 2019-07-22 11:53:39 +02:00
syscalls.scm syscalls: Add 'terminal-rows'. 2019-06-27 11:14:40 +02:00
system.scm system: Mapped devices needed for boot do not yield Shepherd services. 2018-06-21 23:54:15 +02:00
test.drv Add unit test for derivation parsing and output. 2012-04-19 23:09:55 +02:00
texlive.scm guix: Add texlive importer. 2017-06-15 17:03:19 +02:00
ui.scm ui: 'relevance' considers regexps connected with a logical and. 2019-06-27 11:14:40 +02:00
union.scm union: Add 'relative-file-name'. 2018-05-10 14:53:56 +02:00
upstream.scm upstream: Temporarily skip failing test. 2019-01-28 23:13:40 +01:00
utils.scm utils: canonical-newline-port: Fix handling of carriage return at buffer end. 2019-06-20 14:07:01 +02:00
uuid.scm uuid: 'fat-uuid->string' preserves leading zeros. 2019-05-07 12:18:44 +02:00
workers.scm workers: Add test with exceptions. 2017-11-17 10:47:49 +01:00
zlib.scm tests: Gracefully skip zlib test when zlib is missing. 2019-04-16 17:30:22 +02:00