Skip to content

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Oct 12, 2023

Copy files from main to this branch:

  • Lib/test/libregrtest/*.py
  • Lib/test/init.py
  • Lib/test/main.py
  • Lib/test/autotest.py
  • Lib/test/pythoninfo.py
  • Lib/test/regrtest.py
  • Lib/test/test_regrtest.py

Do not modify scripts running tests such as Makefile.pre.in, .github/workflows/build.yml or Tools/scripts/run_tests.py: do not use --fast-ci and --slow-ci in this change.

Changes:

  • SPLITTESTDIRS: don't include test_inspect.
  • Add utils.process_cpu_count() using len(os.sched_getaffinity(0)).
  • test_regrtest doesn't use @support.without_optimizer which doesn't exist in Python 3.12.
  • Add support.set_sanitizer_env_var().
  • Update test_faulthandler to use support.set_sanitizer_env_var().

Copy files from main to this branch:

* Lib/test/libregrtest/*.py
* Lib/test/__init__.py
* Lib/test/__main__.py
* Lib/test/autotest.py
* Lib/test/pythoninfo.py
* Lib/test/regrtest.py
* Lib/test/test_regrtest.py

Do not modify scripts running tests such as Makefile.pre.in,
.github/workflows/build.yml or Tools/scripts/run_tests.py: do not use
--fast-ci and --slow-ci in this change.

Changes:

* SPLITTESTDIRS: don't include test_inspect.
* Add utils.process_cpu_count() using len(os.sched_getaffinity(0)).
* test_regrtest doesn't use @support.without_optimizer which doesn't
  exist in Python 3.12.
* Add support.set_sanitizer_env_var().
* Update test_faulthandler to use support.set_sanitizer_env_var().
@vstinner
Copy link
Member Author

cc @serhiy-storchaka @sobolevn

The main drawback of this approach (copy files) is that I skipped all Changelog entries. Sorry, that's just too much work for me :-( You can look at the Changelog in the main branch for details: https://docs.python.org/dev/whatsnew/changelog.html#tests

I plan to merge this change once tests pass, only you see a good reason to not update regrtest this way.

Since I will do the same for 3.11, here are my notes on how I created this PR:

cd ../3.12
git switch -c regrtest12
/bin/cp -Rf ../main/Lib/test/libregrtest/*.py  Lib/test/libregrtest/
git add Lib/test/libregrtest/*py

/bin/cp -Rf ../main/Lib/test/pythoninfo.py  Lib/test/pythoninfo.py 
/bin/cp -Rf ../main/Lib/test/autotest.py  Lib/test/
/bin/cp -Rf ../main/Lib/test/__init__.py  Lib/test/
/bin/cp -Rf ../main/Lib/test/__main__.py  Lib/test/
/bin/cp -Rf ../main/Lib/test/regrtest.py  Lib/test/
/bin/cp -Rf ../main/Lib/test/test_regrtest.py  Lib/test/

meld Lib/test/test_faulthandler.py  ../main/Lib/test/test_faulthandler.py   # in fact at the end, both files are the same

git ci -a  # create the commit
./python -m test -j0 test_regrtest test_support 

@vstinner
Copy link
Member Author

Do not modify scripts running tests such as Makefile.pre.in, .github/workflows/build.yml or Tools/scripts/run_tests.py: do not use --fast-ci and --slow-ci in this change.

We can consider backporting these changes later, but if we do that, I would prefer to do it separately.

@vstinner vstinner merged commit 4b7a12d into python:3.12 Oct 12, 2023
@vstinner vstinner deleted the regrtest12 branch October 12, 2023 20:03
@vstinner
Copy link
Member Author

Ah, I missed some bits: PR #110779.

vstinner added a commit to vstinner/cpython that referenced this pull request Oct 12, 2023
pythongh-110756: Sync regrtest with main branch

Copy files from main to this branch:

* Lib/test/libregrtest/*.py
* Lib/test/__init__.py
* Lib/test/__main__.py
* Lib/test/autotest.py
* Lib/test/pythoninfo.py
* Lib/test/regrtest.py
* Lib/test/test_regrtest.py

Copy also changes from:

* Lib/test/support/__init__.py
* Lib/test/support/os_helper.py
* Lib/test/support/testresult.py
* Lib/test/support/threading_helper.py
* Lib/test/test_support.py

Do not modify scripts running tests such as Makefile.pre.in,
.github/workflows/build.yml or Tools/scripts/run_tests.py: do not use
--fast-ci and --slow-ci in this change.

Changes:

* SPLITTESTDIRS: don't include test_inspect.
* Add utils.process_cpu_count() using len(os.sched_getaffinity(0)).
* test_regrtest doesn't use @support.without_optimizer which doesn't
  exist in Python 3.11.
* Add support.set_sanitizer_env_var().
* Update test_faulthandler to use support.set_sanitizer_env_var().
* @support.without_optimizer doesn't exist in 3.11.
* Add support.Py_DEBUG.
* regrtest.refleak: 3.11 doesn't have sys.getunicodeinternedsize.
@bedevere-app
Copy link

bedevere-app bot commented Oct 12, 2023

GH-110781 is a backport of this pull request to the 3.11 branch.

vstinner added a commit that referenced this pull request Oct 12, 2023
Copy files from main to this branch:

* Lib/test/libregrtest/*.py
* Lib/test/__init__.py
* Lib/test/__main__.py
* Lib/test/autotest.py
* Lib/test/pythoninfo.py
* Lib/test/regrtest.py
* Lib/test/test_regrtest.py

Copy also changes from:

* Lib/test/support/__init__.py
* Lib/test/support/os_helper.py
* Lib/test/support/testresult.py
* Lib/test/support/threading_helper.py
* Lib/test/test_support.py

Do not modify scripts running tests such as Makefile.pre.in,
.github/workflows/build.yml or Tools/scripts/run_tests.py: do not use
--fast-ci and --slow-ci in this change.

Changes:

* SPLITTESTDIRS: don't include test_inspect.
* Add utils.process_cpu_count() using len(os.sched_getaffinity(0)).
* test_regrtest doesn't use @support.without_optimizer which doesn't
  exist in Python 3.11.
* Add support.set_sanitizer_env_var().
* Update test_faulthandler to use support.set_sanitizer_env_var().
* @support.without_optimizer doesn't exist in 3.11.
* Add support.Py_DEBUG.
* regrtest.refleak: 3.11 doesn't have sys.getunicodeinternedsize.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants