Sébastien Hinderer
2160aace87
ocamltest: export environment to more external commands
2018-03-19 08:42:43 +01:00
Sébastien Hinderer
fab457a8f5
ocamltest: implement the has_symlink test
...
Lets one test whether symlinks are available on the target platform
2018-03-16 07:40:58 +01:00
Sébastien Hinderer
1f24a7589c
ocamltest: define the compiler_stdin variable
2018-03-16 07:40:58 +01:00
Sébastien Hinderer
cc96f887e6
ocamltest: simplify / fix the builtin run action
...
- Stop adding the output variable to the environment
- Take stdout and stderr into acocunt if they have been defined
2018-03-16 07:40:58 +01:00
Sébastien Hinderer
a32a0f3922
ocamltest: translate "/dev/null" to "NUL" on Windows
2018-03-16 07:40:58 +01:00
Sébastien Hinderer
2a7a7deeff
ocamltest: bug fix: register the caml_ld_library_path variable
2018-03-16 07:40:58 +01:00
Sébastien Hinderer
c715d93da5
ocamltest: Makefile improvements
...
- Use := everywhere
- Merge two ifeq blocks
2018-03-16 07:40:58 +01:00
Sébastien Hinderer
185f972731
ocamltest: native actions should skip when native compilers are disabled
2018-03-09 17:26:58 +01:00
Sébastien Hinderer
30793f1e1a
ocamltest: add the compile_only variable
...
When set to true, test programs are only compiled, not linked
2018-03-06 14:41:20 +01:00
Sébastien Hinderer
214cbd5b0c
ocamltest: add the arch32 and arch64 actions
...
These actions pass on 32/64 bits architectures
2018-03-06 14:40:36 +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
f4dbdc4577
ocamltest: add support for lexers and parsers
2018-03-01 16:45:23 +01:00
Sébastien Hinderer
258db89910
ocamltest: add a command to run ocamllex
2018-03-01 16:45:23 +01:00
Sébastien Hinderer
966f7edb63
ocamltest: add variables to pass flags to ocamllex and ocamlyacc
2018-03-01 16:44:54 +01:00
Sébastien Hinderer
9bd3ab2323
ocamltest: define paths to ocamllex and ocamlyacc
2018-03-01 16:43:44 +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
494757e5ae
ocamltest: compiler and toplevel classes enhancements
...
In the compiler class, replace the backend and is_native methods
by host and target ones.
In the toplevel class, get rid of the is_native method which is useless
at the moment.
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
3ecb6b8e13
ocamltest: various minor simplifications, cleanups and fixes
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
c5ea4aa83a
ocamltest: add a family method to the tool class
...
It represents the type of tool in a printable way.
The compiler subclass sets it to "compiler" and the toplevel
subclass sets it to "toplevel".
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
3cedaaed4d
ocamltest: add a compiler method to the toplevel class
...
When a toplevel test consists in more than one file, it is necessary to
compile the auxiliary files so that they can then be loaded into the toplevel.
This method stores for each toplevel the compiler to use to do this.
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
63c8b9542c
ocamltest: simplify setup_compiler_build_env
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
e9e7f6d12b
ocamltest use the program_variable and progrma_output_variable methods
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
24872924ce
ocamltest: add methods to the compiler class
...
Add the program_variable and program_output_varibles methods to the
compiler class.
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
1f43fc3a5e
ocamltest: remove the is_toplevel field from compiler and toplevel classes
...
This field has become useless
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
e6aa158479
ocamltest: move code to the right place
...
Move the compiler-specific build environment setup actions
from the setup_tool_build_env to the setup_compiler_build_env function.
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
dad2b57dce
ocamltest: introduce the force_remove function
...
It checks whether a file exists before removing it.
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
ec7e30a99a
ocamltest: introduce specialised functions to setup build environments
...
Before this commit there was only one function to set up build environments
for compilers and toplevels.
This commit introduces a generic setup_tool_build_env function
(which contains the code of the former setup_compiler_build_env) and
the specialised setup_compiler_build_env and setup_toplevel_build_env
functions which undertake the setup actions that are specific to
compilers and toplevels, respectively.
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
d00beb71e3
ocamltest: distinguish toplevels from compilers
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
c36849d915
ocamltest: define the compilers with classes
...
This commit also introduces the ocaml_tools module.
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
8d7753c8f6
ocamltest: start using add_if_undefined
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
fa7c389ccf
ocamltest: clarify log message
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
3a4c5b9dd8
ocamltest: add the add_if_undefined function to environments
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
50367061e0
ocamltest: fix typo in field name
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
52e92191ca
ocamltest: define more variables in the build env setup actions
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
0ed100758a
ocamltest: add the is_toplevel and is_native fields to compiler description
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
2fc46409b8
ocamltest: introduce the ocamlrunparam variable
2018-02-27 18:32:32 +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
Sébastien Hinderer
ae2da9b80d
ocamltest: let each variable specify how to export it to system env
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
a57ba47265
ocamltest: add more system environment lookup functions to stdlib
2018-02-27 18:32:32 +01:00
Sébastien Hinderer
95b3f53591
ocamltest: fix typo
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
Sébastien Hinderer
f87a66600b
ocamltest: cosmetic update in log messages
2018-02-20 17:59:44 +01:00
Sébastien Hinderer
f0e2b2c463
ocamltest: expand variables before exporting them to system env
2018-02-20 08:30:46 +01:00
Sébastien Hinderer
689a3e1edb
ocamltest: use the module variable only if it is not empty
2018-02-19 15:49:12 +01:00
Sébastien Hinderer
c32c3c82d9
ocamltest: fix typo
2018-02-19 15:49:12 +01:00
Sébastien Hinderer
3ecfddf4d2
ocamltest: rename and complete the AFL-related tests
2018-02-19 15:49:12 +01:00
Sébastien Hinderer
ca70c51cd7
ocamltest: update dependencies
2018-02-19 10:27:28 +01:00
Sébastien Hinderer
b7184e017e
ocamltest: complete and clarify support for runtime flags
2018-02-19 09:13:15 +01:00
Sébastien Hinderer
a436ebe2be
ocamltest: clarify / fix the use of runtime-related flags
2018-02-14 19:59:49 +01:00
Sébastien Hinderer
01d436ba71
ocamltest: fix typo in previous commit
2018-02-08 15:04:06 +01:00