# HG changeset patch # User Anton Shestakov # Date 1575295007 -25200 # Node ID c46f0430a668b594a4a4a136c933b9b547e8bcaf # Parent 3cd5e9b1d0398afdbc730ff6cd48a9bee45f9e81 test-compat: run tests with -j more than 1 In 4.7 and below run-tests.py defaults to -j1. We want more speed, so we use the same mechanism to detect the available number of CPU threads as the newer versions of run-tests.py. diff -r 3cd5e9b1d039 -r c46f0430a668 .gitlab-ci.yml --- a/.gitlab-ci.yml Mon Dec 02 14:44:00 2019 +0100 +++ b/.gitlab-ci.yml Mon Dec 02 20:56:47 2019 +0700 @@ -9,7 +9,8 @@ - hg pull -R /ci/repos/mercurial/ - hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')") - hg -R /ci/repos/mercurial/ update "$hg_rev" - - (cd tests; /ci/repos/mercurial/tests/run-tests.py --color=always) + - jobs=$(python -c 'import multiprocessing; print multiprocessing.cpu_count()') + - (cd tests; /ci/repos/mercurial/tests/run-tests.py -j $jobs --color=always) tests-py2-pure: image: octobus/ci-py2-hgext3rd @@ -17,4 +18,5 @@ - hg pull -R /ci/repos/mercurial/ - hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')") - hg -R /ci/repos/mercurial/ update "$hg_rev" - - (cd tests; /ci/repos/mercurial/tests/run-tests.py --color=always --pure) + - jobs=$(python -c 'import multiprocessing; print multiprocessing.cpu_count()') + - (cd tests; /ci/repos/mercurial/tests/run-tests.py -j $jobs --color=always --pure)