gh-125669: Do not run `-ugui` tests by default on `make test` (#125730)

Adds `make ci` target for use in CI and keeping `make test` for the local development.
This commit is contained in:
sobolevn 2024-10-30 17:14:22 +03:00 committed by GitHub
parent 1064141967
commit 1f16df4bfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 20 additions and 4 deletions

View File

@ -468,7 +468,7 @@ jobs:
- name: Display build info - name: Display build info
run: make pythoninfo run: make pythoninfo
- name: Tests - name: Tests
run: xvfb-run make test run: xvfb-run make ci
build_tsan: build_tsan:
name: 'Thread sanitizer' name: 'Thread sanitizer'

View File

@ -69,4 +69,4 @@ jobs:
--fail-on-improvement --fail-on-improvement
--path-prefix="./" --path-prefix="./"
- name: Tests - name: Tests
run: make test run: make ci

View File

@ -105,4 +105,4 @@ jobs:
run: sudo mount "$CPYTHON_RO_SRCDIR" -oremount,rw run: sudo mount "$CPYTHON_RO_SRCDIR" -oremount,rw
- name: Tests - name: Tests
working-directory: ${{ env.CPYTHON_BUILDDIR }} working-directory: ${{ env.CPYTHON_BUILDDIR }}
run: xvfb-run make test run: xvfb-run make ci

View File

@ -1142,13 +1142,21 @@ make test
^^^^^^^^^ ^^^^^^^^^
Build the ``all`` target and run the Python test suite with the Build the ``all`` target and run the Python test suite with the
``--fast-ci`` option. Variables: ``--fast-ci`` option without GUI tests. Variables:
* ``TESTOPTS``: additional regrtest command-line options. * ``TESTOPTS``: additional regrtest command-line options.
* ``TESTPYTHONOPTS``: additional Python command-line options. * ``TESTPYTHONOPTS``: additional Python command-line options.
* ``TESTTIMEOUT``: timeout in seconds (default: 10 minutes). * ``TESTTIMEOUT``: timeout in seconds (default: 10 minutes).
make ci
^^^^^^^
This is similar to ``make test``, but uses the ``-ugui`` to also run GUI tests.
.. versionadded:: 3.14
make buildbottest make buildbottest
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^

View File

@ -2104,6 +2104,12 @@ cleantest: all
# Similar to buildbottest, but use --fast-ci option, instead of --slow-ci. # Similar to buildbottest, but use --fast-ci option, instead of --slow-ci.
.PHONY: test .PHONY: test
test: all test: all
$(TESTRUNNER) --fast-ci -u-gui --timeout=$(TESTTIMEOUT) $(TESTOPTS)
# Run a basic set of regression tests inside the CI.
# This excludes some tests that are particularly resource-intensive.
# Similar to test, but also runs GUI tests.
ci: all
$(TESTRUNNER) --fast-ci --timeout=$(TESTTIMEOUT) $(TESTOPTS) $(TESTRUNNER) --fast-ci --timeout=$(TESTTIMEOUT) $(TESTOPTS)
# Run the test suite for both architectures in a Universal build on OSX. # Run the test suite for both architectures in a Universal build on OSX.

View File

@ -0,0 +1,2 @@
Change ``make test`` to not run GUI tests by default. Use ``make ci`` to run
tests with GUI tests instead.