summaryrefslogtreecommitdiffstats
path: root/Lib/test/libregrtest/win_utils.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-116103: Prevent error in WindowsLoadTracker.__del__ on permission ↵Miss Islington (bot)2024-02-291-0/+4
| | | | | | | | | | | error (GH-116105) (GH-116120) gh-116103: Prevent error in WindowsLoadTracker.__del__ on permission error (GH-116105) (cherry picked from commit 186fa9387669bcba6d3974a99c012c2b2c6fb4ce) gh-116103: Prevent error in WindowsLoadTracker.__del__ if there was a permission error Co-authored-by: Petr Viktorin <encukou@gmail.com>
* bpo-44336: Prevent tests hanging on child process handles on Windows (GH-26578)Jeremy Kloth2022-03-221-163/+95
| | | | | Replace the child process `typeperf.exe` with a daemon thread that reads the performance counters directly. This prevents the issues that arise from inherited handles in grandchild processes (see issue37531 for discussion). We only use the load tracker when running tests in multiprocess mode. This prevents inadvertent interactions with tests expecting a single threaded environment. Displaying load is really only helpful for buildbots running in multiprocess mode anyway.
* bpo-40275: Use new test.support helper submodules in tests (GH-21772)Hai Shi2020-08-071-2/+4
|
* bpo-36670: Enhance regrtest (GH-16556)Victor Stinner2019-10-031-19/+47
| | | | | | | | | | | | | | * Add log() method: add timestamp and load average prefixes to main messages. * WindowsLoadTracker: * LOAD_FACTOR_1 is now computed using SAMPLING_INTERVAL * Initialize the load to the arithmetic mean of the first 5 values of the Processor Queue Length value (so over 5 seconds), rather than 0.0. * Handle BrokenPipeError and when typeperf exit. * format_duration(1.5) now returns '1.5 sec', rather than '1 sec 500 ms'
* bpo-36670: Enhance regrtest WindowsLoadTracker (GH-16553)Victor Stinner2019-10-031-26/+42
| | | | The last line is now passed to the parser even if it does not end with a newline, but only if it's a valid value.
* bpo-36670, regrtest: Fix WindowsLoadTracker() for partial line (GH-16550)Victor Stinner2019-10-021-1/+4
| | | | WindowsLoadTracker.read_output() now uses a short buffer for incomplete line.
* bpo-36670: Multiple regrtest bugfixes (GH-16511)Victor Stinner2019-10-011-15/+52
| | | | | | | | | | | | | | | | * Windows: Fix counter name in WindowsLoadTracker. Counter names are localized: use the registry to get the counter name. Original change written by Lorenz Mende. * Regrtest.main() now ensures that the Windows load tracker is also killed if an exception is raised * TestWorkerProcess now ensures that worker processes are no longer running before exiting: kill also worker processes when an exception is raised. * Enhance regrtest messages and warnings: include test name, duration, add a worker identifier, etc. * Rename MultiprocessRunner to TestWorkerProcess * Use print_warning() to display warnings. Co-Authored-By: Lorenz Mende <Lorenz.mende@gmail.com>
* bpo-36511: Fix failures in Windows ARM32 buildbot (GH-15181)Paul Monson2019-08-081-0/+1
|
* Fix typos in comments, docs and test names (#15018)Min ho Kim2019-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Fix typos in comments, docs and test names * Update test_pyparse.py account for change in string length * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: Dealloccte -> Deallocate Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Update posixmodule checksum. * Reverse idlelib changes.
* bpo-36719: regrtest closes explicitly WindowsLoadTracker (GH-12965)Victor Stinner2019-04-261-1/+7
| | | | Regrtest.finalize() now closes explicitly the WindowsLoadTracker instance.
* bpo-36725: regrtest: add TestResult type (GH-12960)Victor Stinner2019-04-261-3/+2
| | | | | | | | | | | | | | | * Add TestResult and MultiprocessResult types to ensure that results always have the same fields. * runtest() now handles KeyboardInterrupt * accumulate_result() and format_test_result() now takes a TestResult * cleanup_test_droppings() is now called by runtest() and mark the test as ENV_CHANGED if the test leaks support.TESTFN file. * runtest() now includes code "around" the test in the test timing * Add print_warning() in test.libregrtest.utils to standardize how libregrtest logs warnings to ease parsing the test output. * support.unload() is now called with abstest rather than test_name * Rename 'test' variable/parameter to 'test_name' * dash_R(): remove unused the_module parameter * Remove unused imports
* bpo-34060: Report system load when running test suite for Windows (GH-8357)Ammar Askar2019-04-091-0/+100
While Windows exposes the system processor queue length, the raw value used for load calculations on Unix systems, it does not provide an API to access the averaged value. Hence to calculate the load we must track and average it ourselves. We can't use multiprocessing or a thread to read it in the background while the tests run since using those would conflict with test_multiprocessing and test_xxsubprocess. Thus, we use Window's asynchronous IO API to run the tracker in the background with it sampling at the correct rate. When we wish to access the load we check to see if there's new data on the stream, if there is, we update our load values.