Commit Graph

12 Commits

Author SHA1 Message Date
Tobias Geerinckx-Rice 10ceb3e846
import: cran: Fix description->package test.
This follows up on commit 5cd1019488.

* tests/cran.scm (description): Include a very long line.
(description->package): Update the golden description to match the
paragraph filling now performed by BEAUTIFY-DESCRIPTION.
2021-12-18 04:09:47 +01:00
Ludovic Courtès aa6921634b
import: cran: Emit new-style package inputs.
* guix/import/cran.scm (format-inputs): Emit symbols or
'specification->package' calls.
(maybe-inputs): Wrap in 'list' instead of 'quasiquote'.
* tests/cran.scm ("description->package"): Adjust accordingly.
2021-07-11 00:49:16 +02:00
Ludovic Courtès cfd1ed8401
import: cran: Avoid uses of '@@' in the tests.
* guix/import/cran.scm (description->alist, description->package): Export.
<top level>: Set! 'listify'.
* tests/cran.scm (description-alist, "description->package"): Remove use
of '@@' to access the relevant bindings.
2020-01-16 23:14:05 +01:00
Mathieu Othacehe db427602d8
import: cran: Robustify cran-package?.
* guix/import/cran.scm (package->upstream-name): Return #f if url
  start and end index could not be determined.
  (cran-package?): Check if the upstream-name can be extracted from
  given package.
* tests/cran.scm: Add "r-minimal is not a cran package" to make sure that
  r-minimal is not detected as a cran package.

This fixes a failure of guix refresh on r-minimal because no
upsteam-name can be determined from ".../R-version.tar.gz" uri.
2017-05-13 12:40:20 +02:00
Ludovic Courtès dd420bf343
tests: Avoid zero-expression 'begin' form.
* tests/cran.scm ("description->package"): Add body after the expected
pattern in 'match'.
2017-03-08 23:42:52 +01:00
Ludovic Courtès 324a2ba56c
tests: Adjust 'url-fetch' mocks to TLS changes.
This is a followup to bc3c41ce36.

* tests/cpan.scm ("cpan->guix-package"): Add #:verify-certificate?
parameter in 'url-fetch' mock.
* tests/cran.scm ("description->package"): Likewise.
2016-11-10 11:58:43 +01:00
Mathieu Lirzin a9edb211e7 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.
2016-04-03 14:19:09 +02:00
Ben Woodcroft a132f7d68f tests: Move beatify-description tests to import-tests.
Fixes <http://bugs.gnu.org/22391>.

* tests/cran.scm (beautify-description: use double spacing,
beautify-description: transform fragment into sentence). Move
from here ...
* tests/import-utils.scm: ... to here. New file.
* Makefile.am (SCM_TESTS): Add import-utils.
2016-01-20 22:06:25 +10:00
Ricardo Wurmus d0bd632f89 import: Add Bioconductor importer and updater.
* guix/import/cran.scm (%bioconductor-updater,
latest-bioconductor-release, bioconductor-package?): New procedures.
(cran->guix-package): Support repositories other than CRAN.
(%bioconductor-url, %bioconductor-svn-url): New variables.
(description->package): Update signature to distinguish between packages
from different repositories.
(latest-release): Rename procedure ...
(latest-cran-release): ... to this.
(cran-package?): Do not assume all R packages are available on CRAN.
* tests/cran.scm: Update tests.
* guix/scripts/import/cran.scm: Add "--archive" option and default to
CRAN.
* guix/scripts/refresh.scm (%updaters): Add "%bioconductor-updater".
* doc/guix.texi: Document Bioconductor importer and updater.
2016-01-20 12:41:28 +01:00
Ricardo Wurmus 0f6b9e9828 import: cran: Parse DESCRIPTION instead of HTML.
* guix/import/cran.scm (description->alist, listify,
  beautify-description, description->package): New procedures.
(table-datum, downloads->url, nodes->text, cran-sxml->sexp): Remove
proceduces.
(latest-release): Use parsed DESCRIPTION instead of SXML.
* tests/cran.scm: Rewrite to match importer.
2015-12-11 15:35:07 +01:00
Ricardo Wurmus a77adfe022 tests: cran: Use cran-uri in expected output.
* tests/cran.scm: Expect output to use "cran-uri" procedure.
2015-09-24 12:05:53 +02:00
Ricardo Wurmus e1248602f9 import: Add 'cran' importer.
* guix/import/cran.scm: New file.
* guix/scripts/import.scm: Add "cran" to 'importers'.
* guix/scripts/import/cran.scm: New file.
* tests/cran.scm: New file.
* Makefile.am (MODULES): Add 'guix/import/cran.scm' and
  'guix/scripts/import/cran.scm'.
  (SCM_TESTS): Add 'tests/cran.scm'.
* doc/guix.texi (Invoking guix import): Document it.
* po/guix/POTFILES.in: Add 'guix/scripts/import/cran.scm'.
2015-08-31 15:39:34 +02:00