D5071: run-tests: run tests with as many processes as cores by default
This revision was automatically updated to reflect the committed changes. Closed by commit rHGe7e70c033783: run-tests: run tests with as many processes as cores by default (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5071?vs=12037=12054 REVISION DETAIL https://phab.mercurial-scm.org/D5071 AFFECTED FILES tests/run-tests.py tests/test-run-tests.t CHANGE DETAILS diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t --- a/tests/test-run-tests.t +++ b/tests/test-run-tests.t @@ -15,7 +15,7 @@ = $ rt() > { - > "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` "$@" + > "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` -j1 "$@" > } error paths @@ -1329,7 +1329,7 @@ Add support for external test formatter === - $ CUSTOM_TEST_RESULT=basic_test_result "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` "$@" test-success.t test-failure.t + $ CUSTOM_TEST_RESULT=basic_test_result "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` -j1 "$@" test-success.t test-failure.t running 2 tests using 1 parallel processes # Ran 2 tests, 0 skipped, 0 failed. diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -51,6 +51,7 @@ import distutils.version as version import errno import json +import multiprocessing import os import random import re @@ -287,7 +288,7 @@ IMPL_PATH = b'JYTHONPATH' defaults = { -'jobs': ('HGTEST_JOBS', 1), +'jobs': ('HGTEST_JOBS', multiprocessing.cpu_count()), 'timeout': ('HGTEST_TIMEOUT', 180), 'slowtimeout': ('HGTEST_SLOWTIMEOUT', 500), 'port': ('HGTEST_PORT', 20059), To: indygreg, #hg-reviewers, pulkit Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5071: run-tests: run tests with as many processes as cores by default
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This seems like a useful default behavior so tests run faster by default* - Except in special circumstances where the OS/filesystem doesn't scale well to many CPU cores (like APFS *cough* *cough*). REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5071 AFFECTED FILES tests/run-tests.py tests/test-run-tests.t CHANGE DETAILS diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t --- a/tests/test-run-tests.t +++ b/tests/test-run-tests.t @@ -15,7 +15,7 @@ = $ rt() > { - > "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` "$@" + > "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` -j1 "$@" > } error paths @@ -1329,7 +1329,7 @@ Add support for external test formatter === - $ CUSTOM_TEST_RESULT=basic_test_result "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` "$@" test-success.t test-failure.t + $ CUSTOM_TEST_RESULT=basic_test_result "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` -j1 "$@" test-success.t test-failure.t running 2 tests using 1 parallel processes # Ran 2 tests, 0 skipped, 0 failed. diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -51,6 +51,7 @@ import distutils.version as version import errno import json +import multiprocessing import os import random import re @@ -287,7 +288,7 @@ IMPL_PATH = b'JYTHONPATH' defaults = { -'jobs': ('HGTEST_JOBS', 1), +'jobs': ('HGTEST_JOBS', multiprocessing.cpu_count()), 'timeout': ('HGTEST_TIMEOUT', 180), 'slowtimeout': ('HGTEST_SLOWTIMEOUT', 500), 'port': ('HGTEST_PORT', 20059), To: indygreg, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel