Skip to content

Commit adacfee

Browse files
committed
Document the OCAML_TEST_SIZE environment variable
1 parent b26afe0 commit adacfee

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

testsuite/HACKING.adoc

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
== Running the testsuite
22

3-
== Creating a new test
4-
53
== Useful Makefile targets
64

75
`make parallel`::
@@ -30,3 +28,22 @@
3028
`git diff`, that the change really corresponds to an intended output
3129
difference, and not to a regression. You then need to commit the change to
3230
reference file, and your commit message should explain why the output changed.
31+
32+
== Creating a new test
33+
34+
== Dimensioning the tests
35+
36+
By default, tests should run well on small virtual machines (2 cores, 2 Gb RAM, 64 or 32 bits), taking at most one minute, and preferably less than 10 seconds, to run on such a machine.
37+
38+
Some machines used for continuous integration are more capable than that. They use the `OCAML_TEST_SIZE` environment variable to report the available resources:
39+
40+
|====
41+
| `OCAML_TEST_SIZE` | Resources | Word size
42+
43+
| `1` or unset | 2 cores, 2 Gb RAM | 32 or 64 bits
44+
| `2` | 4 cores, 4 Gb RAM | 64 bits
45+
| `3` | 8 cores, 8 Gb RAM | 64 bits
46+
|=====
47+
48+
Tests, then, can check the `OCAML_TEST_SIZE` environment variable and increase the number of cores or the amount of memory used. The default should always be 2 cores and 2 Gb RAM.
49+

0 commit comments

Comments
 (0)