Tests: standardize TAP_AUTOTIME parsing in python
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 29 Feb 2024 19:42:41 +0000 (14:42 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 29 Feb 2024 20:34:29 +0000 (15:34 -0500)
Disable TAP autotime only when 'TAP_AUTOTIME == 0'. Also remove the
version check as we don't support Python <= 3.3 and there is already an
assertion in the code.

Change-Id: Idf8badb5a27b1a01cbe7c230495eec342b9c3878
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/utils/lttngtest/tap_generator.py
tests/utils/test_utils.py

index f2c9fc2b02352baff4142a91d796d42e5a1e9c2d..e3d61e68818046ea25e975295cb52be3850c87a9 100644 (file)
@@ -86,7 +86,7 @@ class TapGenerator:
         self._printed_plan = False  # type: bool
         self._has_failure = False  # type: bool
         self._time_tests = True  # type: bool
-        if os.getenv("TAP_AUTOTIME", "1") == "" or os.getenv("TAP_AUTOTIME", "1") == "0":
+        if os.getenv("TAP_AUTOTIME", "1") == "0":
             self._time_tests = False
         self._last_time = _get_time_ns()
 
index 30c057bddd53dfcca865e7d28b0c56fdb608acc9..d87cd1e32696807be20314c90f9e043d83eed4fa 100644 (file)
@@ -24,7 +24,7 @@ sys.path.append(lttng_bindings_libs_path)
 from lttng import *
 
 _time_tests = True
-if os.getenv("TAP_AUTOTIME", "1") == "" or os.getenv("TAP_AUTOTIME", "1") == "0" or sys.version_info < (3,3,0):
+if os.getenv("TAP_AUTOTIME", "1") == "0":
     _time_tests = False
 
 
This page took 0.032403 seconds and 4 git commands to generate.