Commit Graph

11 Commits (master)

Author SHA1 Message Date
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 7d272e8b3f ocamltest: introduce the commandline built-in variable 2018-04-19 09:06:33 +02:00
Sébastien Hinderer 8d081016bf ocamltest: let the pass, skip and fail actions explain why they happen
This commit introduces a reason variable. It is used by the pass, skip and
fail actions and provides the possibility to give a more precise reason
for why a test succeeds, passes or fails.
2018-03-27 17:12:38 +02:00
Sébastien Hinderer 41bd4f2ebf ocamltest: add the cd builtin action
This gives tests control over ocamltest's current working directory
2018-03-23 09:33:19 +01:00
octachron ece7e44d1a ocamltest: machinery for ocamldoc tests
* a new test ocamldoc
* three new modifiers: html, latex and man for each ocamldoc backend
* new variables:
   * plugins
   * skip_header_lines, skip_header_bytes
   * ocamldoc_{backend,exit_status,flags,output,reference}
* make it possible to skip lines in the result file in text mode
* check_output reads skip_header_{lines,bytes} when comparing
output and reference files
2018-03-06 11:58:10 +01:00
Sébastien Hinderer 95c80b19fd ocamltest: make it possible to specify an exit status for programs
This makes it possible to specify that a program is expected to
return a non-zero exit status
2018-02-28 21:03:44 +01:00
Sébastien Hinderer 65ada89479 ocamltest: move and rename variable
Builtin_variables.ld_library_path is now
Ocaml_variables.caml_ld_library_path
2018-02-27 18:32:32 +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 5614abf918 ocamltest: enhance communication with hooks
Before this commit, ocamltest hooks could modify environment when they
succeded, but they were not able to report a reason when they returned a
skip or falure result.

This commit removes this limitation. To do so, the ocamltest_env variable
has been renamed to ocamltest_response.

When the hook returns a PASS result, the content of the ${ocamltest_response}
file is interpreted as a list of environment modifiers, as was the case for the content of
${ocamltest_env} before this commit.

However, from now on, the content of ${ocamltest_response} is also read
(as a string, which is trimmed), when the hook returns a skip or
failure result.
This string should describe why the hook returned the skip or fail result.
2018-01-22 17:11:40 +01:00
Sébastien Hinderer f0b9b8e9c4 ocamltest: refactoring and implementation of hooks 2017-11-23 17:04:46 +01: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