Run a script.
Run-script is a utility for testing evaluation of the forms in
a given file, to check that the output is as expected. The forms need not be
embedded event forms (see events), and they need not all evaluate
successfully; for example, a thm form may produce a failed proof
:inhibited-summary-types i-s-t ; default '(time steps)
:inhibit-output-lst i-o-l ; default '(proof-tree)
:ld-error-action action ; default ':continue
where the keyword arguments are evaluated.
For information on the keyword arguments, see set-inhibited-summary-types,
set-inhibit-output-lst, and ld-error-action.
When you call (run-script NAME), the forms in NAME-input.lsp
are evaluated and a transcript is written to NAME-log.out.
Forms that are commands change the logical world.
To use run-script for regression testing, you will need
to create three files in addition to the input file, as described below.
For an example, see the files books/demos/mini-proveall-*.* in
the community-books; there, NAME is mini-proveall.
- NAME-input.lsp — the file of forms to be evaluated
- NAME-book.acl2 — a file containing the following, where the
indicated zero or more include-book forms are exactly those that are
in NAME-input.lsp (note that the form (ubu 1) can perhaps be omitted
but is needed in some cases, e.g., see
(include-book "tools/run-script" :dir :system)
(run-script "NAME") ; optionally add keyword arguments
; Help dependency scanner.
- NAME-book.lisp — a small file containing only these two forms:
(identical-files-p "NAME-log.txt" "NAME-log.out"))
- NAME-log.txt — the expected result from evaluating the forms in
To create NAME-log.txt, initially create it as the empty file (or,
actually, create any file with that name). Then run the test, for example
using cert.pl (see build::cert.pl) as follows.
<PATH_TO_books/build>/cert.pl -j 8 NAME-book
Now inspect the generated file NAME-log.out. When you are satisfied
that it is as expected, move it to NAME-log.txt. The cert.pl
command displayed above should now succeed.
NOTE: If you fail to create file NAME-log.txt, you will likely see an
error message of the following form when you run cert.pl.
make: *** No rule to make target `NAME-log.txt', needed by `NAME-book.cert'.
The solution is to create the missing file NAME-log.txt, for example
with the following shell command.
NOTE for ACL2(r) users: The prompt is set by run-script so that the
usual "(r)" is not printed.