aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test-runner/bin/test-runner.py.in
diff options
context:
space:
mode:
authorDamian Szuberski <[email protected]>2022-01-13 17:51:12 +0100
committerGitHub <[email protected]>2022-01-13 09:51:12 -0700
commit8a7c4efd3cf47ce4a27b00c176845f1ac1c483c8 (patch)
tree54891144d7500f1e9656e09b4ba5df0e763e9c8f /tests/test-runner/bin/test-runner.py.in
parentda9c6c033388c19cf3a2b4c5a9ab4287cb831c9c (diff)
Removed Python 2 and Python 3.5- support
Deprecation of Python versions below 3.6 gives opportunity to unify the build and install requirements for OpenZFS packages. The minimal supported Python version is 3.6 as this is the most recent Python package CentOS/RHEL 7 users can get. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Reviewed-by: John Kennedy <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #12925
Diffstat (limited to 'tests/test-runner/bin/test-runner.py.in')
-rwxr-xr-xtests/test-runner/bin/test-runner.py.in14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/test-runner/bin/test-runner.py.in b/tests/test-runner/bin/test-runner.py.in
index d32e05c45..304494083 100755
--- a/tests/test-runner/bin/test-runner.py.in
+++ b/tests/test-runner/bin/test-runner.py.in
@@ -15,19 +15,14 @@
# Copyright (c) 2012, 2018 by Delphix. All rights reserved.
# Copyright (c) 2019 Datto Inc.
#
-# This script must remain compatible with Python 2.6+ and Python 3.4+.
+# This script must remain compatible with Python 3.6+.
#
-# some python 2.7 system don't have a configparser shim
-try:
- import configparser
-except ImportError:
- import ConfigParser as configparser
-
import os
import sys
import ctypes
import re
+import configparser
from datetime import datetime
from optparse import OptionParser
@@ -37,7 +32,7 @@ from select import select
from subprocess import PIPE
from subprocess import Popen
from threading import Timer
-from time import time
+from time import time, CLOCK_MONOTONIC_RAW
BASEDIR = '/var/tmp/test_results'
TESTDIR = '/usr/share/zfs/'
@@ -49,9 +44,6 @@ LOG_OUT = 'LOG_OUT'
LOG_ERR = 'LOG_ERR'
LOG_FILE_OBJ = None
-# some python 2.7 system don't have a concept of monotonic time
-CLOCK_MONOTONIC_RAW = 4 # see <linux/time.h>
-
class timespec(ctypes.Structure):
_fields_ = [