1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/utils/lit/tests/parallelism-groups.py
Julian Lettner bc2e551490 [lit] Use better name for "test in parallel" concept
In the past, lit used threads to run tests in parallel. Today we use
`multiprocessing.Pool`, which uses processes. Let's stay more abstract
and use "worker" everywhere.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D68475

llvm-svn: 373794
2019-10-04 21:40:20 +00:00

22 lines
697 B
Python

# Check that we do not crash if a parallelism group is set to None. Permits
# usage of the following pattern.
#
# [lit.common.cfg]
# lit_config.parallelism_groups['my_group'] = None
# if <condition>:
# lit_config.parallelism_groups['my_group'] = 3
#
# [project/lit.cfg]
# config.parallelism_group = 'my_group'
#
# Note: We need at least 2 tests to prevent lit from using "single process
# mode", which ignores parallelism groups.
#
# RUN: %{lit} -j2 %{inputs}/parallelism-groups | FileCheck %s
# CHECK: -- Testing: 2 tests, 2 workers --
# CHECK-DAG: PASS: parallelism-groups :: test1.txt
# CHECK-DAG: PASS: parallelism-groups :: test2.txt
# CHECK: Expected Passes : 2