summary refs log tree commit diff
path: root/tests/cpan.scm
AgeCommit message (Collapse)Author
2023-06-09tests: Ensure 'cpan' updater test does not access the network.Ludovic Courtès
Previously it would try to access the real metacpan.org. This would succeed when network is available because "Test-Script" is an existing package. * tests/cpan.scm ("package-latest-release"): Wrap 'upstream-source-inputs' call in 'parameterize'. Set 'current-http-proxy'. Change the order of responses in 'with-http-server'.
2023-05-31tests: Use quasiquoted 'match' patterns for package sexps.Ludovic Courtès
Turns out it's easier to read. * tests/cpan.scm ("cpan->guix-package"): Use a quasiquoted pattern. * tests/elpa.scm (eval-test-with-elpa): Likewise. * tests/gem.scm ("gem->guix-package") ("gem->guix-package with a specific version") ("gem-recursive-import") ("gem-recursive-import with a specific version"): Likewise. * tests/hexpm.scm ("hexpm-recursive-import"): Likewise. * tests/opam.scm ("opam->guix-package"): Likewise. * tests/pypi.scm ("pypi->guix-package, no wheel") ("pypi->guix-package, wheels") ("pypi->guix-package, no usable requirement file.") ("pypi->guix-package, package name contains \"-\" followed by digits"): Likewise. * tests/texlive.scm ("texlive->guix-package"): Likewise.
2023-05-31import: cpan: Updater provides input list.Ludovic Courtès
* guix/import/cpan.scm (latest-release): Add 'inputs' field. * tests/cpan.scm ("package-latest-release"): New test.
2023-05-31import: cpan: Represent dependencies as <upstream-input> records.Ludovic Courtès
* guix/import/cpan.scm (cpan-name->downstream-name) (cran-dependency->upstream-input, cran-module-inputs): New procedures. (cpan-module->sexp)[guix-name, convert-inputs]: Remove. [maybe-inputs]: Adjust to deal with <upstream-input>. Use 'cpan-name->downstream-name' instead of 'guix-name'. Add call to 'cpan-module-inputs' and adjust calls to 'maybe-inputs'. No longer emit input labels. * tests/cpan.scm ("cpan->guix-package"): Adjust test accordingly.
2022-10-22Remove now unnecessary uses of (guix grafts).Ludovic Courtès
These modules would use (guix grafts) just to access '%graft?' and related bindings, which are now in (guix store). * gnu/ci.scm, guix/gexp.scm, guix/lint.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/deploy.scm, guix/scripts/environment.scm, guix/scripts/home.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/pull.scm, guix/scripts/size.scm, guix/scripts/system.scm, guix/scripts/weather.scm, tests/builders.scm, tests/channels.scm, tests/cpan.scm, tests/derivations.scm, tests/gexp.scm, tests/graph.scm, tests/guix-daemon.sh, tests/monads.scm, tests/pack.scm, tests/packages.scm, tests/profiles.scm, tests/system.scm: Remove #:use-module (guix grafts).
2020-01-15import: cpan: Rewrite tests to use an HTTP server instead of mocking.Ludovic Courtès
* guix/import/cpan.scm (%metacpan-base-url): New variable. (module->dist-name, cpan-fetch): Refer to it instead of the hard-coded URL. * tests/cpan.scm ("cpan->guix-package"): Use 'with-http-server' instead of 'mock'.
2020-01-15import: cpan: Rewrite to use 'define-json-mapping'.Ludovic Courtès
* guix/import/cpan.scm (<cpan-dependency>, <cpan-release>): New JSON-mapped record types. (metacpan-url->mirror-url): New procedure. (cpan-source-url): Rewrite in terms of it. (cpan-version): Remove. (cpan-module->sexp): Rewrite to take a <cpan-release> instead of an alist, and rename 'meta' to 'release'. [convert-inputs]: Rewrite to use 'cpan-release-dependencies'. Update calls to 'convert-inputs' to pass a list of symbols. Replace 'assoc-ref' calls with the appropriate field accessors. (cpan->guix-package): Rename 'module-meta' to 'release'. (latest-release): Likewise, and use the appropriate accessors. * tests/cpan.scm (test-json): Remove "prereqs" record; add "dependency" list. ("source-url-http", "source-url-https"): Remove. ("metacpan-url->mirror-url, http") ("metacpan-url->mirror-url, https"): New tests.
2019-08-22Revert "import: cpan: Adapt for the change to guile-json version 3."Mark H Weaver
This reverts commit 01ce7af25add55514f737af48ea6c127bedfde67.
2019-08-21import: cpan: Adapt for the change to guile-json version 3.Christopher Baines
In guile-json version 3, JSON objects are represented as hash tables, rather than alists. * guix/import/cpan.scm (string->license): Change the match expression to match on lists, rather than vectors. (module->dist-name, cpan-source-url, cpan-version): Change assoc-ref to hash-ref. (cpan-module->sexp): Change assoc-ref to hash-ref, and assoc-ref* to hash-ref*. * tests/cpan.scm ("source-url-http", "source-url-https"): Convert the alist to a hash table.
2018-09-04Switch to Guile-Gcrypt.Ludovic Courtès
This removes (guix hash) and (guix pk-crypto), which now live as part of Guile-Gcrypt (version 0.1.0.) * guix/gcrypt.scm, guix/hash.scm, guix/pk-crypto.scm, tests/hash.scm, tests/pk-crypto.scm: Remove. * configure.ac: Test for Guile-Gcrypt. Remove LIBGCRYPT and LIBGCRYPT_LIBDIR assignments. * m4/guix.m4 (GUIX_ASSERT_LIBGCRYPT_USABLE): Remove. * README: Add Guile-Gcrypt to the dependencies; move libgcrypt as "required unless --disable-daemon". * doc/guix.texi (Requirements): Likewise. * gnu/packages/bash.scm, guix/derivations.scm, guix/docker.scm, guix/git.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/cran.scm, guix/import/crate.scm, guix/import/elpa.scm, guix/import/gnu.scm, guix/import/hackage.scm, guix/import/texlive.scm, guix/import/utils.scm, guix/nar.scm, guix/pki.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/download.scm, guix/scripts/hash.scm, guix/scripts/pack.scm, guix/scripts/publish.scm, guix/scripts/refresh.scm, guix/scripts/substitute.scm, guix/store.scm, guix/store/deduplication.scm, guix/tests.scm, tests/base32.scm, tests/builders.scm, tests/challenge.scm, tests/cpan.scm, tests/crate.scm, tests/derivations.scm, tests/gem.scm, tests/nar.scm, tests/opam.scm, tests/pki.scm, tests/publish.scm, tests/pypi.scm, tests/store-deduplication.scm, tests/store.scm, tests/substitute.scm: Adjust imports. * gnu/system/vm.scm: Likewise. (guile-sqlite3&co): Rename to... (gcrypt-sqlite3&co): ... this. Add GUILE-GCRYPT. (expression->derivation-in-linux-vm)[config]: Remove. (iso9660-image)[config]: Remove. (qemu-image)[config]: Remove. (system-docker-image)[config]: Remove. * guix/scripts/pack.scm: Adjust imports. (guile-sqlite3&co): Rename to... (gcrypt-sqlite3&co): ... this. Add GUILE-GCRYPT. (self-contained-tarball)[build]: Call 'make-config.scm' without #:libgcrypt argument. (squashfs-image)[libgcrypt]: Remove. [build]: Call 'make-config.scm' without #:libgcrypt. (docker-image)[config, json]: Remove. [build]: Add GUILE-GCRYPT to the extensions Remove (guix config) from the imported modules. * guix/self.scm (specification->package): Remove "libgcrypt", add "guile-gcrypt". (compiled-guix): Remove #:libgcrypt. [guile-gcrypt]: New variable. [dependencies]: Add it. [*core-modules*]: Remove #:libgcrypt from 'make-config.scm' call. Add #:extensions. [*config*]: Remove #:libgcrypt from 'make-config.scm' call. (%dependency-variables): Remove %libgcrypt. (make-config.scm): Remove #:libgcrypt. * build-aux/build-self.scm (guile-gcrypt): New variable. (make-config.scm): Remove #:libgcrypt. (build-program)[fake-gcrypt-hash]: New variable. Add (gcrypt hash) to the imported modules. Adjust load path assignments. * gnu/packages/package-management.scm (guix)[propagated-inputs]: Add GUILE-GCRYPT. [arguments]: In 'wrap-program' phase, add GUILE-GCRYPT to the search path.
2018-08-24import: cpan: Adjust test to new URL.Ludovic Courtès
This is a followup to 9aba9b127840a116c806a2cbac901cf8077abcd0. * tests/cpan.scm ("cpan->guix-package"): Adjust 'home-page' URL.
2017-10-30Revert "import: cpan: Use HTTPS for home pages."Tobias Geerinckx-Rice
This reverts commit 29f7bf59d5d4d4b848eaedc6766bb4e02cae20d3: HTTPS support at search.cpan.org is unreliable, at best. Don't rely on it.
2017-10-29import: cpan: Use HTTPS for home pages.Tobias Geerinckx-Rice
* guix/import/cpan.scm (cpan-home): Use HTTPS. * tests/cpan.scm ("cpan->guix-package"): Expect it.
2017-10-28import: cpan: Add trailing "/" on home-page.Eric Bavier
This appeases 'guix lint', which otherwise complains about permanent redirects. * guix/import/cpan.scm (cpan-module->sexp): Add trailing "/" on home-page. * tests/cpan.scm ("cpan->guix-package"): Adjust accordingly.
2017-10-28import: cpan: Propagate imported dependencies.Eric Bavier
This is most often the need for perl module dependencies. * guix/import/cpan.scm (cpan-module->sexp): 'inputs -> 'propagated-inputs. * tests/cpan.scm ("cpan->guix-package"): Adjust accordingly.
2017-09-14import: cpan: Adjust expected license in tests.Ludovic Courtès
This is a followup to 01ef804d69b2e57dd7b1d3d13e66e3f67e7c548a. * tests/cpan.scm ("cpan->guix-package"): Expect 'perl-license'.
2017-06-07import: cpan: Update CPAN importer to use MetaCPAN v1 API.James Richardson
* guix/import/cpan.scm (module->dist-name, cpan-fetch): Use metacpan.org URLs. * tests/cpan.scm ("cpan->guix-package"): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-02-13tests: Adjust for 'http-fetch' change in (guix import json).Ludovic Courtès
This is a followup to commit 81e0bc1834490a1a8092c75a0733b15c2b407285. * tests/cpan.scm ("cpan->guix-package"): Add a 'rest' argument to the lambda that mocks 'http-fetch'. * tests/crate.scm ("crate->guix-package"): Likewise. * tests/gem.scm ("gem->guix-package"): Likewise. * tests/pypi.scm ("pypi->guix-package"): Likewise. ("pypi->guix-package, wheels"): Likewise.
2016-12-18tests: Mock up http-fetch.Ricardo Wurmus
This is a follow-up to commit 63773200d7ac68fcaee6efd9ffe8ea7aa3fafa38. * tests/cpan.scm ("cpan->guix-package"): Add mock definition of http-fetch.
2016-12-18tests: Adjust cpan tests.Ricardo Wurmus
This is a follow-up to commit ff55fe559951b88bfd691b9dada3a0f26002c4cb. * tests/cpan.scm (source-url-http, source-url-https): Use cpan-source-url.
2016-11-10tests: Adjust 'url-fetch' mocks to TLS changes.Ludovic Courtès
This is a followup to bc3c41ce36349ed4ec758c70b48a7059e363043a. * tests/cpan.scm ("cpan->guix-package"): Add #:verify-certificate? parameter in 'url-fetch' mock. * tests/cran.scm ("description->package"): Likewise.
2016-08-31tests: cpan: Fix mock urls.Eric Bavier
Followup to 7a62263ee5. * tests/cpan.scm (cpan->guix-package): Use "https" in mock urls.
2016-07-03import: cpan: Use our mirrors for 'https' URLs.Alex Sassmannshausen
* guix/import/cpan.scm (fix-source-url): New procedure. (cpan-module->sexp): Use it to construct our source-url. * tests/cpan.scm: Add tests for fix-source-url. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-04-03build: Add a Guile custom test driver using SRFI-64.Mathieu Lirzin
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.
2016-03-06tests: Disable grafting by default for most tests.Ludovic Courtès
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'.
2015-02-20import: cpan: Update tests for dependency handling.Eric Bavier
* tests/cpan.scm (test-json): Remove core module dependencies. [cpan->guix-package]: Add mock url handling for module api. Adjust expected native-inputs and license.
2015-01-09import: Add CPAN importer.Eric Bavier
* guix/import/cpan.scm, guix/scripts/import/cpan.scm, tests/cpan.scm: New files. * Makefile.am (MODULE)[HAVE_GUILE_JSON]: Add them. * guix/scripts/import.scm (importers): Add cpan. * doc/guix.texi (Requirements): Mention `guix import cpan` as a user of guile-json. (Invoking guix import): Document new `guix import cpan` command.