if self.ns.wait:
input("Press any key to continue...")
+ support.PGO = self.ns.pgo
+
setup_tests(self.ns)
self.find_tests(tests)
"check_warnings", "check_no_resource_warning", "EnvironmentVarGuard",
"run_with_locale", "swap_item",
"swap_attr", "Matcher", "set_memlimit", "SuppressCrashReport", "sortdict",
- "run_with_tz",
+ "run_with_tz", "PGO",
]
class Error(Exception):
# Save the initial cwd
SAVEDCWD = os.getcwd()
+# Set by libregrtest/main.py so we can skip tests that are not
+# useful for PGO
+PGO = False
+
@contextlib.contextmanager
def temp_dir(path=None, quiet=False):
"""Return a context manager that creates a temporary directory.
from test import support
from io import BytesIO
+if support.PGO:
+ raise unittest.SkipTest("test is not helpful for PGO")
+
try:
import threading
except ImportError:
BREAKPOINT_FN='builtin_id'
+@support.skipIf(support.PGO, "not useful for PGO")
class DebuggerTests(unittest.TestCase):
"""Test that the debugger can debug Python."""
import unittest
import test._test_multiprocessing
+from test import support
+
+if support.PGO:
+ raise unittest.SkipTest("test is not helpful for PGO")
+
+
test._test_multiprocessing.install_tests_in_module_dict(globals(), 'fork')
if __name__ == '__main__':
import unittest
import test._test_multiprocessing
+from test import support
+
+if support.PGO:
+ raise unittest.SkipTest("test is not helpful for PGO")
+
test._test_multiprocessing.install_tests_in_module_dict(globals(), 'forkserver')
if __name__ == '__main__':
make_pkg, make_script, make_zip_pkg, make_zip_script,
assert_python_ok)
+if support.PGO:
+ raise unittest.SkipTest("test is not helpful for PGO")
+
# Look up which start methods are available to test
import multiprocessing
AVAILABLE_START_METHODS = set(multiprocessing.get_all_start_methods())
import unittest
import test._test_multiprocessing
+from test import support
+
+if support.PGO:
+ raise unittest.SkipTest("test is not helpful for PGO")
+
test._test_multiprocessing.install_tests_in_module_dict(globals(), 'spawn')
if __name__ == '__main__':
except ImportError:
threading = None
+if support.PGO:
+ raise unittest.SkipTest("test is not helpful for PGO")
+
mswindows = (sys.platform == "win32")
#
# The task to run while instrumented when building the profile-opt target.
# We exclude unittests with -x that take a rediculious amount of time to
# run in the instrumented training build or do not provide much value.
-PROFILE_TASK=-m test.regrtest --pgo -x test_asyncore test_gdb test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_subprocess
+PROFILE_TASK=-m test.regrtest --pgo
# report files for gcov / lcov coverage report
COVERAGE_INFO= $(abs_builddir)/coverage.info
set BUILDX64=\r
set TARGET=Rebuild\r
set TESTTARGETDIR=\r
-set PGO=\r
+set PGO=default\r
\r
\r
:CheckOpts\r
if "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts\r
if "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts\r
if "%1" EQU "--pgo" (set PGO=%~2) && shift && shift && goto CheckOpts\r
+if "%1" EQU "--skip-pgo" (set PGO=) && shift && goto CheckOpts\r
\r
if "%1" NEQ "" echo Invalid option: "%1" && exit /B 1\r
\r
\r
:Help\r
echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--skip-build]\r
-echo [--pgo COMMAND] [--skip-doc] [--download DOWNLOAD URL] [--test TARGETDIR]\r
+echo [--pgo COMMAND] [--skip-pgo] [--skip-doc] [--download DOWNLOAD URL] [--test TARGETDIR]\r
echo [-h]\r
echo.\r
echo --out (-o) Specify an additional output directory for installers\r
echo --build (-b) Incrementally build Python rather than rebuilding\r
echo --skip-build (-B) Do not build Python (just do the installers)\r
echo --skip-doc (-D) Do not build documentation\r
-echo --pgo Build x64 installers using PGO\r
+echo --pgo Specify PGO command for x64 installers\r
+echo --skip-pgo Build x64 installers using PGO\r
echo --download Specify the full download URL for MSIs\r
echo --test Specify the test directory to run the installer tests\r
echo -h Display this help information\r