brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 1e3a012 Raw
28 lines · python
1# Create a directory with 20 files and check the number of pools and workers per pool that lit will use.2 3# RUN: rm -Rf %t.dir && mkdir -p %t.dir4# RUN: %python -c "for i in range(20): open(rf'%t.dir/file{i}.txt', 'w').write('RUN:')"5 6# RUN:  echo "import lit.formats" > %t.dir/lit.cfg7# RUN:  echo "config.name = \"top-level-suite\"" >> %t.dir/lit.cfg8# RUN:  echo "config.suffixes = [\".txt\"]" >> %t.dir/lit.cfg9# RUN:  echo "config.test_format = lit.formats.ShTest()" >> %t.dir/lit.cfg10 11 12# 15 workers per pool max, 100 workers total max: we expect lit to cap the workers to the number of files13# RUN: env "LIT_WINDOWS_MAX_WORKERS_PER_POOL=15" %{lit} -s %t.dir/ -j100 > %t.out 2>&114# CHECK: Using 2 pools balancing 20 workers total distributed as [10, 10]15# CHECK: Passed: 2016 17# 5 workers per pool max, 17 workers total max18# RUN: env "LIT_WINDOWS_MAX_WORKERS_PER_POOL=5" %{lit} -s %t.dir/ -j17 >> %t.out 2>&119# CHECK: Using 4 pools balancing 17 workers total distributed as [5, 4, 4, 4]20# CHECK: Passed: 2021 22# 19 workers per pool max, 19 workers total max23# RUN: env "LIT_WINDOWS_MAX_WORKERS_PER_POOL=19" %{lit} -s %t.dir/ -j19 >> %t.out 2>&124# CHECK-NOT: workers total distributed as25# CHECK: Passed: 2026 27# RUN: cat %t.out | FileCheck %s28