Kaydet (Commit) 29d007bb authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) GitHub

[3.6] bpo-30871: Add test.pythoninfo (#3174)

* bpo-30871: Add test.pythoninfo (#3075)

* Add Lib/test/pythoninfo.py: script collecting various informations
  about Python to help debugging test failures.
* regrtest: remove sys.hash_info and sys.flags from header.
* Travis CI, Appveyor: run pythoninfo before tests
(cherry picked from commit b907abc8)

* bpo-30871: pythoninfo: add expat and _decimal (#3121)

* bpo-30871: pythoninfo: add expat and _decimal

* Remove _decimal.__version__

The string is hardcoded, not really interesting.

(cherry picked from commit f6ebd838)

* bpo-30871: Add "make pythoninfo" (#3120)

(cherry picked from commit a3a01a2f)

* bpo-30871: pythoninfo: more sys, os, time data (#3130)

* bpo-30871: pythoninfo: more sys, os, time data

PythonInfo now converts types other than intger to string by default.

* fix typo

(cherry picked from commit ad7eaed5)

* bpo-31231: Fix pythoninfo in Travis config (#3134)

bpo-31231, bpo-30871: Replace "./python -m test.pythoninfo" with
"make pythoninfo", since macOS uses ./python.exe.
(cherry picked from commit 92b1f901)
üst e76cb435
......@@ -7,6 +7,7 @@ branches:
- buildbot-custom
build_script:
- cmd: PCbuild\build.bat -e
- cmd: PCbuild\win32\python.exe -m test.pythoninfo
test_script:
- cmd: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
environment:
......
......@@ -59,6 +59,7 @@ matrix:
# Need a venv that can parse covered code.
./python -m venv venv
./venv/bin/python -m pip install -U coverage
./venv/bin/python -m test.pythoninfo
script:
# Skip tests that re-run the entire test suite.
- ./venv/bin/python -m coverage run --pylib -m test -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
......@@ -86,6 +87,7 @@ before_script:
echo "$changes"
exit 1
fi
make pythoninfo
script:
# Using the built Python as patchcheck.py is built around the idea of using
......
......@@ -423,8 +423,6 @@ class Regrtest:
print("==", platform.python_implementation(), *sys.version.split())
print("==", platform.platform(aliased=True),
"%s-endian" % sys.byteorder)
print("== hash algorithm:", sys.hash_info.algorithm,
"64bit" if sys.maxsize > 2**32 else "32bit")
print("== cwd:", os.getcwd())
cpu_count = os.cpu_count()
if cpu_count:
......@@ -432,7 +430,6 @@ class Regrtest:
print("== encodings: locale=%s, FS=%s"
% (locale.getpreferredencoding(False),
sys.getfilesystemencoding()))
print("Testing with flags:", sys.flags)
def run_tests(self):
# For a partial run, we do not need to clutter the output.
......
This diff is collapsed.
......@@ -1001,6 +1001,8 @@ TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS)
TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
TESTTIMEOUT= 1200
.PHONY: test testall testuniversal buildbottest pythoninfo
# Run a basic set of regression tests.
# This excludes some tests that are particularly resource-intensive.
test: @DEF_MAKE_RULE@ platform
......@@ -1039,6 +1041,9 @@ buildbottest: build_all platform
fi
$(TESTRUNNER) -j 1 -u all -W --slowest --timeout=$(TESTTIMEOUT) $(TESTOPTS)
pythoninfo: build_all
$(RUNSHARED) ./$(BUILDPYTHON) -m test.pythoninfo
QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
test_multibytecodec test_urllib2_localnet test_itertools \
test_multiprocessing_fork test_multiprocessing_spawn \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment