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

29 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
Andy Wingo
1120efe375 Fix race in check-guile to make needless guile-procedures symlink
* check-guile.in (top_srcdir): Don't try to make guile-procedures.tx, as
this races with multiple checkers, and it's gross.
* meta/uninstalled-env.in (GUILE_DOCSTRINGS_PATH): Instead when
uninstalled, use this variable.
* module/ice-9/documentation.scm (documentation-files): Remove the
current directory from the search path for documentation files; this was
always a hack.  Instead allow GUILE_DOCSTRINGS_PATH to override the
built-in search path.
2024-06-23 11:13:18 +02:00
Rob Browning
df04f5357a Switch to the preferred parallel automake test harness
Automake "strongly discourages" use of the serial driver, and switching
to the preferred parallel driver allows make -j4 check to run in about
half the time on a four core (not thread) host.

* Makefile.am (TESTS, TESTS_ENVIRONMENT): run ./check-guile from
test-suite/, not here.
* check-guile.in: let test harness handle progress output.
* configure.ac (AM_INIT_AUTOMAKE): allow parallel testing.
* test-suite/Makefile.am (SCM_TESTS): remove non-tests.
(EXTRA_DIST): move non-tests here.
(TESTS): include SCM_TESTS (now driven from here).
(TEST_EXTENSIONS): allow customization for .scm and .test.
(TESTS_ENVIRONMENT): stop defining (user only).
(AM_TESTS_ENVIRONMENT): replaces TESTS_ENVIRONMENT; drop guile.
(SCM_LOG_COMPILER): run .scm tests via meta/guile.
(AM_SCM_LOG_FLAGS): keep --no-auto-compile for .scm tests.
(TEST_LOG_DRIVER): run .test tests via custom automake ./driver.
* test-suite/driver: add automake test driver.
2024-06-20 15:35:48 +02:00
Rob Browning
08285b6894 check-guile.in: exit 2 on errors and direct output to stderr
Return 2 rather than 1 for errors so that 1 will be available for any
future boolean tests (as with say grep).

Direct error message to stderr rather than stdout.

* check-guile.in: send error message to stderr and exit 2 (not 1).
2024-06-20 15:35:48 +02:00
Rob Browning
6495b4d578 check-guile.in: improve quoting (e.g. paths with spaces)
* check-guile.in: improve shell quoting.
2024-04-14 16:15:10 -05:00
Rob Browning
c665e18705 check-guile: add example invoking a test via gdb
* check-guile.in: add example invoking a test via gdb.
2024-04-14 13:24:23 -05:00
Andy Wingo
d10f7b572c move (test-suite lib) to lower dir; cleans up uninstalled paths.
* check-guile.in:
* test-suite/Makefile.am:
* test-suite/test-suite/lib.scm:

* benchmark-guile.in:
* benchmark-suite/Makefile.am:
* benchmark-suite/benchmark-suite/lib.scm: Lower the lib modules in the
  source tree.  This lets us remove top_srcdir and top_builddir from the
  uninstalled paths.

* test-suite/tests/asm-to-bytecode.test:
* test-suite/tests/brainfuck.test:
* test-suite/tests/compiler.test:
* test-suite/tests/ftw.test:
* test-suite/tests/gc.test:
* test-suite/tests/match.test:
* test-suite/tests/rnrs-libraries.test:
* test-suite/tests/rnrs-test-a.scm:
* test-suite/tests/sxml.match.test: Adapt to not expect that module
  names be prefixed with "test-suite".
2012-04-23 21:46:06 +02:00
Andy Wingo
6f06e8d35f autocompile -> auto-compile
* NEWS:
* check-guile.in:
* doc/guile.1:
* doc/ref/scheme-scripts.texi:
* libguile/init.c:
* libguile/load.c:
* libguile/load.h:
* libguile/script.c:
* module/Makefile.am:
* module/ice-9/boot-9.scm:
* module/scripts/compile.scm:
* module/system/base/compile.scm:
* test-suite/Makefile.am:
* test-suite/tests/popen.test: Change "autocompile" to "auto-compile" or
  "auto_compile", as appropriate, in variable names, function names,
  command line arguments, and the documentation.
2011-02-13 15:06:11 +01:00
Andy Wingo
33002867d7 fix check-guile.in for default vm change
* check-guile.in: Make the --debug fix in the source file, not the
  generated file. Grr.
2010-09-28 10:03:55 +02:00
Neil Jerram
6069e97331 Fix hanging of popen.test
The "open-output-pipe":"no duplicate" test has been hanging, on and
off, and not completely reliably, for a few years.  It's now doing so
fairly reliably for me, and investigation shows that

- the child shell process is in a tight loop (99% CPU)

- the parent Guile process is stuck calling waitpid().

The problem is that the child hasn't got the SIGPIPE that the test
intends, and so is continuing to echo "closed" forever; and Guile is
waiting for it to terminate, forever.

I haven't fully debugged the SIGPIPE problem, but it sounds very like
what Chet Ramey describes here:
http://old.nabble.com/Re%3A-SIGPIPE-not-properly-reset-with-%27trap---PIPE%27-p20985595.html.

(And my version of bash is 3.2.39.)

So, a fix should be to use something other than shell to implement the
child; and it appears that this works.

* check-guile.in (TEST_SUITE_DIR): Export.

* test-suite/tests/popen-child.scm: New script file.

* test-suite/tests/popen.test ("open-output-pipe", "no duplicate"):
  Use Guile for the child process, instead of shell.
2010-07-01 22:16:54 +01:00
Andy Wingo
609edba7ea disable autocompilation in the test suite
* check-guile.in: Disable autocompilation while working in the test
  suite, for now at least. We'll enable it again later.
2009-08-20 18:52:38 +02:00
Andy Wingo
23ccb831ff rely on getrlimit to DTRT, don't make stack calibration file
* libguile/measure-hwm.scm: Remove.

* .gitignore: Update for removal.

* test-suite/standalone/test-fast-slot-ref.in:
* test-suite/standalone/test-use-srfi.in:
* am/guilec:
* check-guile.in: Revert back to normal guile invocation.

* libguile/Makefile.am: Don't make a stack calibration file, as the
  getrlimit-based limit setting should work fine.
2009-03-27 15:51:16 -07:00
Andy Wingo
0b6d8fdc28 allow building against uninstalled guile; move some things to meta/
* README: Add more info about building against an uninstalled Guile.

* meta/: New directory. The proximate cause of its creation is that I
  want to be able to build external packages against uninstalled Guile,
  and to do that I need guile-tools in the PATH, but I don't want
  $top_builddir/libtool in the path. But it seems like a good
  reorganization, for things that are /about/ Guile: pkg-config files, m4
  files, guile-config... then we also include uninstalled info: the
  environment, the pre-inst-guile script, etc.

* meta/guile-1.8-uninstalled.pc.in: New pkg-config template. pkg-config
  prefers -uninstalled pkg-config files, if they are in its path.

* meta/Makefile.am:
* meta/ChangeLog-2008:
* meta/gdb-uninstalled-guile.in:
* meta/guile-1.8.pc.in:
* meta/guile-config.in:
* meta/guile.m4:
* meta/guile-tools.in: Moved to meta/.

* meta/guile.in: This is the new name of pre-inst-guile.in.

* meta/uninstalled-env.in: And this, pre-inst-guile-env.in.

* Makefile.am:
* am/guilec:
* am/pre-inst-guile:
* check-guile.in:
* configure.in:
* doc/ref/Makefile.am:
* gc-benchmarks/run-benchmark.scm:
* test-suite/standalone/Makefile.am:
* test-suite/standalone/README:
* testsuite/Makefile.am: Adapt to meta/ change.
2009-03-27 14:03:03 -07:00
Neil Jerram
d8b6e19181 Avoid Stack overflow' errors when running make check'
For explanation, see comments and text in the new file
libguile/measure-hwm.scm.

* .gitignore: Add libguile/stack-limit-calibration.scm.

* check-guile.in: Load libguile/stack-limit-calibration.scm.

* configure.in: Add AC_CONFIG_FILES to generate test-use-srfi from
  test-use-srfi.in.

* libguile/Makefile.am (TESTS, TESTS_ENVIRONMENT,
  stack-limit-calibration.scm): New targets, so that `make check'
  calibrates the stack limit before running the Guile test suite.

* libguile/measure-hwm.scm: New file, calibrates stack limit for `make
  check'.

* libguile/stackchk.c (scm_sys_get_stack_size): New primitive.

* libguile/stackchk.h (scm_sys_get_stack_size): New primitive
  (declaration).

* test-suite/standalone/test-use-srfi: Renamed test-use-srfi.in, so
  that ./configure can fill in variables in it.

* test-suite/standalone/test-use-srfi.in: Load
  libguile/stack-limit-calibration.scm.
2008-10-17 22:05:54 +01:00
Thien-Thi Nguyen
829fdfbc6d (top_srcdir): Use `top_srcdir_absolute' AC_SUBST var. 2002-03-04 22:53:34 +00:00
Thien-Thi Nguyen
931022f87b Update usage comment; nfc. 2002-02-26 10:16:57 +00:00
Thien-Thi Nguyen
22087438a8 (top_builddir): Use AC_SUBST var `top_builddir_absolute'.
(guile): Look for pre-inst-guile in $top_builddir.
2002-02-26 10:12:06 +00:00
Thien-Thi Nguyen
ae84ee626e (TEST_SUITE_DIR): Fix bug: Use `top_srcdir'.
(GUILE_LOAD_PATH): No longer include $top_srcdir.
2002-02-05 10:32:35 +00:00
Thien-Thi Nguyen
e15fa93d74 (top_builddir): Fix bug: Use cwd. 2002-02-05 10:09:39 +00:00
Thien-Thi Nguyen
ba833f4a2f (srcdir): Delete var.
(top_builddir, top_srcdir, guile_opts): New vars.

Use "set -e".
No longer set LTDL_LIBRARY_PATH.
Use ${top_srcdir}/pre-inst-guile instead of libguile/guile.
2002-02-05 09:21:54 +00:00
Marius Vollmer
fb39eb4933 * check-guile.in: Replaced ln -s' by @LN_S@' to supports
build systems which do not have symbolic links.
2001-11-02 00:05:45 +00:00
Marius Vollmer
f91fc9cdd3 Do not include ".libs" in LTDL_LIBRARY_PATH, libltdl provides it
itself.
2001-08-26 21:51:32 +00:00
Michael Livshin
1db81cb09a * check-guile.in: fix to be runnable when srcdir!=builddir. 2001-05-28 12:23:41 +00:00
Thien-Thi Nguyen
0e70d77b81 For SRFI testing, set and export env var `LTDL_LIBRARY_PATH'. 2001-05-11 09:42:11 +00:00
Thien-Thi Nguyen
c52b482324 Fix sh standard conformance bug: Replace "test -e"
with "test -f".  Thanks to Alexander Klimov.
2001-03-25 18:40:28 +00:00
Gary Houston
66301f9ab8 * check-guile.in: 16 documentation tests were failing if "make
check" was run before Guile had been installed with the current
	--prefix.  made various changes to the script so that it runs
	without a cd to the test-suite directory.  For the -i option,
	don't point GUILE_LOAD_PATH to the current directory, but let it
	use it's own scheme library.

	* tests/r4rs.test: use test-file-name to locate r4rs.test,
	not data-file-name.

	* guile-test: define tmp-dir, the location where r4rs.test will
	create it's temporary files.
	(data-file-name): use tmp-dir.  this must be under build-dir,
	not src-dir.
2001-03-19 22:46:21 +00:00
Gary Houston
fb11ef91dc * check-guile.in: rename $parent to $srcdir. if it's equal to "."
set it to `pwd`.
2001-03-19 12:38:40 +00:00
Gary Houston
51cfd7da2c * check-guile.in: use @srcdir@ instead of @test_suite_dir@. use
the current directory (build dir) not srcdir to find guile
	executable.  otherwise "make check" doesn't work with a separate
	build directory.  create the test log in
	$build_dir/check-guile.log instead of in srcdir/test-suite
	directory.
	* configure.in: don't define or substitute test_suite_dir.

	* guile-test: use #!/bogus-path/..., not #!/home/dirk/... in the
	first line.
2001-03-18 23:17:32 +00:00
Dirk Herrmann
8992c8a2ef * Forgot to add the file check-guile.in with the latest commit. 2001-01-26 13:47:53 +00:00