1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

16 commits

Author SHA1 Message Date
Andy Wingo
845c873acf Add another code coverage test
* test-suite/tests/coverage.test ("line-execution-counts"): Add a test
  from Taylan Ulrich B, from bug #14849.
2016-06-21 09:07:26 +02:00
Andy Wingo
6679375332 Mark two coverage tests as XFAIL
* test-suite/tests/coverage.test ("several times", "one proc hit, one
  proc unused"): Mark as XFAIL until we can fix either the expander or
  the compiler to have proper source info.
2015-01-23 16:15:59 +01:00
Andy Wingo
a285f38fda More robust coverage tests
* test-suite/tests/coverage.test ("line-execution-counts"): Allow zero
  or one count on the loop head.
2014-04-16 19:13:49 +02:00
Andy Wingo
5e8f5ebaf3 Fix coverage expectations
* test-suite/tests/coverage.test ("line-execution-counts"): Update
  expectations.  Since there's nothing to do at the loop header and the
  renaming of X happens at the end of the loops, the compiled code only
  sees the loop header once.
2014-04-04 16:49:59 +02:00
Andy Wingo
a222cbc9d1 No more VM objects visible to Scheme
* libguile/vm.h:
* libguile/vm.c (scm_the_vm): Don't expose to Scheme.
  (scm_vm_p): Remove, as it is not needed.

* module/system/vm/vm.scm: Remove the-vm and vm? exports.

* doc/ref/api-coverage.texi (Code Coverage):
* test-suite/tests/coverage.test:
* module/system/vm/coverage.scm (with-code-coverage): Don't take a VM
  argument.  Adapt documentation and tests.

* module/ice-9/command-line.scm: Remove the-vm autoload.

* module/system/vm/trace.scm (trace-calls-to-procedure):
  (trace-calls-in-procedure):
  (trace-instructions-in-procedure):
  (call-with-trace): Remove #:vm kwarg, and adapt to trap changes.

* module/system/vm/trap-state.scm (the-trap-state): Rework to use a
  parameter underneath instead of a weak key on (the-vm).

* module/system/vm/traps.scm (new-disabled-trap):
  (new-enabled-trap): Remove vm argument.
  (trap-at-procedure-call):
  (trap-in-procedure):
  (trap-instructions-in-procedure):
  (trap-at-procedure-ip-in-range):
  (trap-at-source-location):
  (trap-frame-finish):
  (trap-in-dynamic-extent):
  (trap-calls-in-dynamic-extent):
  (trap-instructions-in-dynamic-extent):
  (trap-calls-to-procedure):
  (trap-matching-instructions): Remove vm keyword arguments.

* test-suite/tests/control.test ("unwind"): Adapt test.

* test-suite/tests/eval.test (test-suite): Remove the-vm import.
2013-11-21 16:45:03 +01:00
Andy Wingo
e08caa5620 Remove make-vm; there will be one vm per thread now.
* libguile/vm.h:
* libguile/vm.c (scm_make_vm): Remove.

* module/system/vm/vm.scm: Remove make-vm export.

* test-suite/tests/control.test ("the-vm"):
* test-suite/tests/coverage.test (%test-vm):
* test-suite/tests/eval.test ("stack overflow"): Adapt tests.
2013-11-21 15:00:03 +01:00
Andy Wingo
3a858c3275 Fix coverage.test: instrumented-source-files
* test-suite/tests/coverage.test ("instrumented-source-files"): Adapt to
  new expectation that all files loaded on the system will be present in
  the source information.
2013-11-08 09:03:41 +01:00
Andy Wingo
697c4f29d9 Fix coverage.test: "procedure-execution-count: never"
* test-suite/tests/coverage.test ("procedure-execution-count"): Adapt
  test to new behavior of procedure-execution-count of an unseen
  procedure: zero, not false.
2013-11-08 09:00:41 +01:00
Andy Wingo
7a5a533595 Fix coverage.test: "line-execution-counts: one proc hit, one proc unused"
* test-suite/tests/coverage.test ("line-execution-counts"): Fix test for
  even/odd? in letrec.  The test profiles the execution of even?, not
  the letrec, so the last line is in fact not reached.
2013-11-08 09:00:35 +01:00
Ludovic Courtès
41f2f14bd9 tests: Don't rely on `scm_call_2' being visible.
* test-suite/tests/coverage.test ("procedure-execution-count")["called
  from C"]: Throw 'unresolved when `scm_call_2' cannot be resolved.
  Reported by Eli Zaretskii <eliz@gnu.org>.
2013-06-16 20:58:21 +02:00
Ludovic Courtès
1a6ff60da8 coverage: Add test for applicable structs.
* test-suite/tests/coverage.test ("procedure-execution-count")["applicable
  struct"]: New test.
2012-05-31 00:50:36 +02:00
Ludovic Courtès
0129130439 coverage: Add tests for `case-lambda'.
* test-suite/tests/coverage.test
  ("line-execution-counts")["case-lambda"]: New test.
  ("procedure-execution-count")["case-lambda"]: New test.
2011-10-15 17:43:27 +02:00
Ludovic Courtès
7c42e426dc coverage: Add test with `eval'.
* test-suite/tests/coverage.test (test-procedure): New procedure.
  ("procedure-execution-count")["called from eval"]: New test.
2011-10-15 16:46:29 +02:00
Ludovic Courtès
639b2eb710 Fix coverage analysis of procedures called from C.
* module/system/vm/coverage.scm (with-code-coverage): Switch current
  thread to VM, using `set-thread-vm!'.

* test-suite/tests/coverage.test ("procedure-execution-count")["called
  from C"]: New test.
2010-09-24 15:39:47 +02:00
Ludovic Courtès
e7bee74771 Fixlet in `coverage.test'.
* test-suite/tests/coverage.test ("line-execution-counts")["several
  times"]: Add missing `else' clause.
2010-09-23 22:02:14 +02:00
Ludovic Courtès
36b5e39407 Add (system vm coverage).
* module/system/vm/coverage.scm: New file.

* module/Makefile.am (SYSTEM_SOURCES): Add `system/vm/coverage.scm'.

* test-suite/guile-test (main): Use (system vm coverage).  Handle
  `--coverage' and `-c'.

* test-suite/tests/coverage.test: New file.

* test-suite/Makefile.am (SCM_TESTS): Add `tests/coverage.test'.

* doc/ref/Makefile.am (guile_TEXINFOS): Add `api-coverage.texi'.

* doc/ref/api-coverage.texi: New file.

* doc/ref/guile.texi (API Reference): Include it.
2010-05-07 13:47:53 +02:00