1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-29 22:40:34 +02:00
Commit graph

5 commits

Author SHA1 Message Date
Rob Browning
c858253288 test-suite: support SRFI-64 based tests
Add support for SRFI-64 based test-suite tests. When a SCM_TESTS test
ends in .sr64, run it using a new automake "Parallel Test Harness"
compatible driver (see the automake info pages) provided by (srfi
srfi-64 automake). For now, provide .trs file and standard output
results like guile-test's, but write SRFI-64's default test runner
output to the log file.

./check-guile, which the existing automake test-suite/driver relies on,
can now handle .sr64 files, though for the time being, it does not allow
mixing (test-suite lib) and SRFI-64 tests in the same invocation since
doing so correctly would require some way of merging the trs (and log)
output from the currently separate domains. This restriction does not
affect automake (make check) because it runs each test separately with
its own ouput files (e.g. test-suite/tests/numbers.{log,trs}) and
compiles the results.

Don't export anything from (srfi srfi-64 automake) until/unless we're
ready to commit to the API(s). For now, just provide support for
check-guile via (private) main.

* check-guile.in: Process *all* options; handle SRFI-64 tests.
* module/srfi/srfi-64/automake.scm: Add automake SRFI-64 test support.
* test-suite/Makefile.am: Add SRFI-64 test support.
2025-06-14 14:52:08 -05:00
Tomas Volf
ad90f45a8c
Replace SRFI-64 with a new implementation.
The bundled (reference) implementation was of somewhat mixed quality and
it failed to follow standard in multiple places.  This commit replaces
it with a new one, written from scratch to follow the standard as close
as possible.

* module/srfi/srfi-64/testing.scm: Delete file.
* module/srfi/srfi-64.scm: Replace with new implementation.
* am/bootstrap.am (srfi/srfi-64.go): Remove extra dependencies.
(NOCOMP_SOURCES): Remove srfi/srfi-64/testing.scm.
* test-suite/tests/srfi-64-test.scm
("8.6.1. Simple (form 1) test-apply")
("8.6.2. Simple (form 2) test-apply"): Adjust tests to follow the
specification.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-20 19:11:42 +02:00
jakub-w
f10bc1a864 [srfi-64] Fix a bug with test-end removing globally installed test-runner
* testing.scm (%test-begin, %test-end): When (test-runner-current) is
not set, create a new one like before but also add a finalizer that
will remove it after the test is finished. Previously the test runner
was getting unset unconditionally.

See https://srfi-email.schemers.org/srfi-64/msg/16468240/
2021-05-05 12:29:47 +02:00
Daniel Llorens
de5d1a7f99 Fix bug #42713: srfi-64: Reset test-runner-current if done
Reported by Jérémy Korwin-Zmijowski
(https://lists.gnu.org/archive/html/bug-guile/2020-08/msg00010.html).

Fix from
7cf4c01039:

Apply fix from Per Bothner.

In Per's words:

  * testing.scm (%test-end): Reset test-runner-current if done.
  This fixes bug "Loading test source file multiple time without having
  report incrementing" reported to srfi-64 mailing list.

  * srfi-64-test.scm: Update due to recent srfi-64 implementation change.
2020-08-05 12:46:27 +02:00
Mark H Weaver
34e8987734 Implement SRFI-64 - A Scheme API for test suites.
* module/srfi/srfi-64.scm: New file.
* module/srfi/srfi-64/testing.scm: New file.
* module/Makefile.am: Add rule for srfi-64.go dependency on
  srfi-64/testing.scm.
  (SRFI_SOURCES): Add srfi/srfi-64.scm.
  (NOCOMP_SOURCES): Add srfi/srfi-64/testing.scm.
* doc/ref/srfi-modules.texi (SRFI-64): New node.
* test-suite/tests/srfi-64.test: New file.
* test-suite/tests/srfi-64-test.scm: New file.
* test-suite/Makefile.am (SCM_TESTS): Add test-suite/tests/srfi-64.test.
  (EXTRA_DIST): Add tests/srfi-64-test.scm.
2014-02-01 01:19:55 -05:00