Commit Graph

30 Commits (9bc33d945a66bdaaf4124acf70a19761a8e43e92)

Author SHA1 Message Date
David Allsopp 9bc33d945a Add Ocamltest_stdlib.Unix.has_symlink
Replaces the duplicated C stub. Functions from Unix must be explictly
imported.
2020-07-23 14:55:36 +01:00
Xavier Leroy 133102cfc7 ocamltest: add the "naked_pointers" action
It succeeds if the runtime system supports naked pointers,
and fails otherwise (e.g. if configured with --disable-naked-pointers).
2020-06-22 19:37:15 +02:00
Nicolás Ojeda Bär 6ff2c11b25 ocamltest: do not overwrite user-defined variables 2020-06-05 07:40:17 +02:00
Enguerrand Decorne b7f0494df5 Rewrite the instrumented runtime to store traces in the CTF format.
The instrumentation code in the instrumented runtime was replaced
with new APIs to gather runtime statistics and output them in a new format
(Common Trace Format).
This commit also exposes new functions in the Gc module to pause or resume
instrumentation during a program execution (Gc.eventlog_pause and
Gc.eventlog_resume).
2020-04-30 10:32:01 +02:00
Greta Yorsh 4bcb195565 Fix test for arm targets 2019-07-15 10:25:26 +01:00
Greta Yorsh 63f62123df Improve test for function sections 2019-07-15 10:25:26 +01:00
Mark Shinwell 0933593596 Fix ppc64 TOC load for exception handler addresses (#8506)
The address was loaded from the TOC into register r0.  This generated  bad code in the "big TOC" case, as r0 was used as index register.  The fix is to use another temporary register instead of r0.
Add "arch_power" builtin to ocamltest.
Add test case.
2019-03-18 13:31:57 +01:00
Damien Doligez 6015d60fc6
ocamltest: fix `bsd` and `not-bsd` built-in actions (#2223) 2019-02-07 13:07:09 +01:00
David Allsopp a9a76b58a8 Add hasstr and hassysthreads ocamltest actions
Skipped if the given library hasn't been built.
2019-01-08 17:27:42 +01:00
David Allsopp d889a0279a Add hasunix ocamltest action
This test is skipped if *neither* unix nor win32unix have been built.
2019-01-08 17:27:42 +01:00
David Allsopp b5d1929e87 Whitespace and overlong line fixes. 2018-06-14 15:15:34 +01:00
Sébastien Hinderer 6bec0533bb ocamltest: add the macos test 2018-04-25 20:14:48 +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
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 214cbd5b0c ocamltest: add the arch32 and arch64 actions
These actions pass on 32/64 bits architectures
2018-03-06 14:40:36 +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 c04cecc07e ocamltest: clarify the builtin tests a bit
This commit distinguishes the OS tests from the library tests.

It introduces the "libunix" and "libwin32unix" tests to figure out which
library is used.

It also changes to meaning of the "windows" test to pass on all Windows platforms.

Finally, a "not-windows" test is introduced, to be used until negation
on tests is implemented.
2018-02-06 11:48:55 +01:00
Sébastien Hinderer 5229928c62 ocamltest: add actions to test whether we are running on a BSD system 2018-02-05 14:48:56 +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 1ab45a2c06 ocamltest: add the OCaml-specific shared-libraries action
This action passes when support for shared libraries has been
configured. Otherwise, it skips.
2018-01-22 16:40:18 +01:00
Sébastien Hinderer e801cc6269 ocamltest: re-implement the expect test 2017-12-08 19:16:42 +01:00
Sébastien Hinderer f0b9b8e9c4 ocamltest: refactoring and implementation of hooks 2017-11-23 17:04:46 +01:00
Sébastien Hinderer d73671f9b4 Let ocamltest use other runtime variants 2017-11-11 09:23:06 +01:00
David Allsopp b1058dd4f8 Eliminate use of cmp in ocamltest
Previously, ocamltest attempted to normalise the output of commands on
Windows to be Unix files. This fails on a Windows git checkout with the
normal core.autocrlf set to true.

The implementation has been revised not to use cmp and to strip \r from
the end of text files if every line ends in one.
2017-10-26 10:17:25 +01:00
Sébastien Hinderer 1fcba7ea7a ocamltest: simplify tests and actions a bit
Now that actions can occur directly in test blocks, it is no longer
necessary to wrap each action in a test. This commit thus removes
all the single-action tests.

It also renames a few actions to give them simpler names.
2017-10-09 17:09:53 +02:00
Sébastien Hinderer cee23d79a9 ocamltest: add actions to test whether tests are run on Unix or Windows 2017-10-09 17:09:53 +02:00
Sébastien Hinderer 6bf807936a ocamltest: add builtin actions to always pass, skip or fail.
These actions are useful e.g. to debug the tool itself.
2017-10-09 17:09:53 +02:00
Nicolas Ojeda Bar 69b721c0c3 ocamltest: disable comparison of native programs under Windows 2017-09-25 13:54:19 +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