Commit Graph

27 Commits (master)

Author SHA1 Message Date
David Allsopp fc0abfaad8 Remove use of rm -rf from ocamltest 2020-07-23 15:04:49 +01:00
David Allsopp 2317acc0c0 Return tests in alphabetical order 2020-07-27 16:28:27 +01:00
Nicolás Ojeda Bär 7f0dbd4e65
ocamltest: show failing logs (#9696) 2020-06-23 20:47:38 +02:00
Nicolás Ojeda Bär 6ff2c11b25 ocamltest: do not overwrite user-defined variables 2020-06-05 07:40:17 +02:00
Nicolás Ojeda Bär 105ac40bd6 Hide references in Options implementation 2020-05-27 19:19:22 +02:00
Nicolás Ojeda Bär 13e96a1bcf Remove unneeded Sys.chdir 2020-05-27 19:19:22 +02:00
Nicolás Ojeda Bär 15b08d2fdf
Use Filename.quote_command (#9476) 2020-04-20 14:38:10 +02:00
Gabriel Scherer a86943c889 ocamltest: opt-in -keep-test-dir-on-success to keep test data on success 2020-04-02 16:12:21 +02:00
Gabriel Scherer 9eadd76ed1 ocamltest: collect 'summary' information on whether a failure happened 2020-04-02 16:07:48 +02:00
Nicolás Ojeda Bär 3ea1411ee3 Add ocamltest -find-test-dirs and -list-tests options 2019-09-28 18:03:59 +02:00
Sébastien Hinderer 529b9132d8 ocamltest: rename action_name into name in the Actions module. 2019-09-26 17:44:22 +02:00
Gabriel Radanne 1be47bf7ab Just some tbl things. (#1699) 2018-07-23 13:19:41 +01:00
David Allsopp a5f69b0395 Differentiate skipped vs ignored tests
If a test fails or is skipped, then ocamltest skips all the tests below
it. This makes the output of the testsuite a little hard to interpret.

Alter the output so n/a is displayed for the tests underneath - this has
the effect of reducing the number of reported skipped tests back to
pre-ocamltest levels.
2018-07-01 13:13:51 +02:00
Sébastien Hinderer 0f8a3a3e27 ocamltest: introduce the OCAMLTEST_SKIP_TESTS environment variable
This variable contains a space-separated list of files. It instructs
ocamltest to skip all the tests in these files.
2018-05-28 21:46:13 +02:00
Sébastien Hinderer 71560523f5 ocamltest: introduce the MAKE built-in variable
This variable contains a command that can be used to invoke make.
Its initial value is the one of the MAKE variable in the syste
environment of ocamltest. If this value is undefined, it defaults to "make".
2018-04-19 11:33:36 +02:00
Sébastien Hinderer be3c42cb5f ocamltest: remove previous build environment before running a test (2) 2018-04-12 09:22:47 +02:00
Sébastien Hinderer a57ba47265 ocamltest: add more system environment lookup functions to stdlib 2018-02-27 18:32:32 +01:00
Gabriel Scherer 03e8d25f5a ocamltest: also announce system errors as unexpected errors
If you forget to commit a test file with your patch (but include
it in ocamltests), ocamltest will fail (print a message to
standard error and return a non-zero code), but until now it would
not print the standard-format "testing ... => unexpected error"
message which makes the failure visible to the summarize.awk
script.

This commit ensures that such early failures still result in an
explicit unexpected-error message being shown in the standard way,
in addition to stderr-level error reporting.
2018-02-26 14:53:44 +01:00
Gabriel Scherer 352e72d335 ocamltest: implement a -promote option
When -promote is set, running the test automatically overwrites each
reference output file with the actual output of the test. This option,
which mirrors the "make promote" target of old-style testsuite tests,
is very useful when a minor change in compiler/toplevel output affects
a lot of reference files in innocuous ways.

This is the only option of ocamltest that overwrites file in the
source directory, so it should be used with care -- under strict
version-control supervision.

The 'make promote' target is not yet supported for new-style testsuite
tests, as this feature depends on the not-yet-merged GPR#1574

  https://github.com/ocaml/ocaml/pull/1574

For a previous discussions of this feature, see GPR#1519

  https://github.com/ocaml/ocaml/pull/1519
2018-02-07 13:52:35 +01:00
Sébastien Hinderer 8c75ba867f ocamltest: introduce the result module
This module contains types describing test results and functions to
build and use them.

Before this commit, only successful actions were returning an environemnt.
Starting from this commit, actions always return an environemnt, no matter
their result.

This will make it possible to write negations over tests.
2018-02-05 08:49:49 +01:00
Sébastien Hinderer 05a85e7bcf ocamltest: check-typo fixes in main.ml 2017-12-08 14:59:13 +01:00
Nicolas Ojeda Bar 5bde185641 ocamltest: restore cwd after chdir 2017-12-05 17:18:36 +01:00
Sébastien Hinderer 360b550634 ocamltest: improve handling of current directory
This commit saves the current directory before processing a test file
and restores it afterwards.

This is necessary when several test files are given on the command line.
2017-11-30 18:07:55 +01:00
Sébastien Hinderer f0b9b8e9c4 ocamltest: refactoring and implementation of hooks 2017-11-23 17:04:46 +01:00
Sébastien Hinderer 0894e2b18a ocamltest: fix, simplify and clarify the test-tree traversal algorithm 2017-10-09 17:09:53 +02:00
Sébastien Hinderer 5c8b212349 ocamltest: minor code update 2017-10-09 17:09:53 +02:00
Sébastien Hinderer 635b5edcc1 ocamltest: the test driver for the OCaml compiler
This commit contains:

- The initial version of the tool itself, in the ocamltest directory
- The required additions to the main .gitignore and .merlin files.

The integration of ocamltest in OCaml's main build system and its use
in the testsuite are not part of this commit.

Credits go to David Allsopp for
- Extending the computation of ocamlsrcdir to the Windows case
- Making ocamltest compile when flexlink
is being bootstrapped.
2017-09-18 17:40:14 +02:00