summaryrefslogtreecommitdiffstats
path: root/Lib/test/libregrtest
diff options
context:
space:
mode:
authorPaul Monson <paulmon@users.noreply.github.com>2019-04-18 01:06:06 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2019-04-18 01:06:06 (GMT)
commit264a0b40b030fc0ff919b8294df91bdaac853bfb (patch)
tree2da58973178facddbafdb8017add17aa28009aa9 /Lib/test/libregrtest
parent9941f963fe085261aec25545fa9f0cc35f750120 (diff)
downloadcpython-264a0b40b030fc0ff919b8294df91bdaac853bfb.zip
cpython-264a0b40b030fc0ff919b8294df91bdaac853bfb.tar.gz
cpython-264a0b40b030fc0ff919b8294df91bdaac853bfb.tar.bz2
bpo-36638: Fix WindowsLoadTracker exception on some Windows versions (GH-12849)
Diffstat (limited to 'Lib/test/libregrtest')
-rw-r--r--Lib/test/libregrtest/main.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py
index 18ef6d0..d20e174 100644
--- a/Lib/test/libregrtest/main.py
+++ b/Lib/test/libregrtest/main.py
@@ -626,8 +626,13 @@ class Regrtest:
elif sys.platform == 'win32' and (self.ns.worker_args is None):
from test.libregrtest.win_utils import WindowsLoadTracker
- load_tracker = WindowsLoadTracker()
- self.getloadavg = load_tracker.getloadavg
+ try:
+ load_tracker = WindowsLoadTracker()
+ self.getloadavg = load_tracker.getloadavg
+ except FileNotFoundError as error:
+ # Windows IoT Core and Windows Nano Server do not provide
+ # typeperf.exe for x64, x86 or ARM
+ print('Failed to create WindowsLoadTracker: {}'.format(error))
self.run_tests()
self.display_result()