diff options
| author | Graydon Hoare <ghoare@apple.com> | 2017-01-18 18:12:20 +0000 |
|---|---|---|
| committer | Graydon Hoare <ghoare@apple.com> | 2017-01-18 18:12:20 +0000 |
| commit | ae5d7bb4f5a20e550ed204d71b633616731466a4 (patch) | |
| tree | b3f5afbffb4edbe16a09bcf2656f02b889f5c6af /llvm/docs/CommandGuide | |
| parent | f86cca1a4254f3e2c48d096c864b4991d9c953e7 (diff) | |
| download | bcm5719-llvm-ae5d7bb4f5a20e550ed204d71b633616731466a4.tar.gz bcm5719-llvm-ae5d7bb4f5a20e550ed204d71b633616731466a4.zip | |
[lit] Support sharding testsuites, for parallel execution.
Summary:
This change equips lit.py with two new options, --num-shards=M and
--run-shard=N (set by default from env vars LIT_NUM_SHARDS and LIT_RUN_SHARD).
The options must be used together, and N must be in 1..M.
Together these options effect only test selection: they partition the testsuite
into M equal-sized "shards", then select only the Nth shard. They can be used
in a cluster of test machines to achieve a very crude (static) form of
parallelism, with minimal configuration work.
Reviewers: modocache, ddunbar
Reviewed By: ddunbar
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28789
llvm-svn: 292417
Diffstat (limited to 'llvm/docs/CommandGuide')
| -rw-r--r-- | llvm/docs/CommandGuide/lit.rst | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/docs/CommandGuide/lit.rst b/llvm/docs/CommandGuide/lit.rst index 7fc3455ddf6..2e9054b1ce9 100644 --- a/llvm/docs/CommandGuide/lit.rst +++ b/llvm/docs/CommandGuide/lit.rst @@ -152,6 +152,23 @@ SELECTION OPTIONS Run the tests in a random order. +.. option:: --num-shards=M + + Divide the set of selected tests into ``M`` equal-sized subsets or + "shards", and run only one of them. Must be used with the + ``--run-shard=N`` option, which selects the shard to run. The environment + variable ``LIT_NUM_SHARDS`` can also be used in place of this + option. These two options provide a coarse mechanism for paritioning large + testsuites, for parallel execution on separate machines (say in a large + testing farm). + +.. option:: --run-shard=N + + Select which shard to run, assuming the ``--num-shards=M`` option was + provided. The two options must be used together, and the value of ``N`` + must be in the range ``1..M``. The environment variable + ``LIT_RUN_SHARD`` can also be used in place of this option. + ADDITIONAL OPTIONS ------------------ |

