Tests: namespace TAP_AUTOTIME under LTTNG_TESTS
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 29 Feb 2024 19:52:21 +0000 (14:52 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 29 Feb 2024 20:35:29 +0000 (15:35 -0500)
Test suite variables that are user exposed are usually namespaced under
the 'LTTNG_TESTS_' prefix.

Change-Id: I7ec31efa08050460e2a1e274ef35889b97768f87
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/tap-driver.sh
tests/utils/tap/tap.c
tests/utils/tap/tap.sh
tests/utils/test_utils.py

index e3d61e68818046ea25e975295cb52be3850c87a9..75960aece6c25dcfedc51a224dc58db12ea149d6 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") == "0":
+        if os.getenv("LTTNG_TESTS_TAP_AUTOTIME", "1") == "0":
             self._time_tests = False
         self._last_time = _get_time_ns()
 
index 9baa4d923f683758e3a0f6b0cfc2ff3340b8fa18..56d4d3e45487d8eb2c15800f92a355b43b332340 100755 (executable)
@@ -150,7 +150,7 @@ TIME_SCRIPT="$(realpath -e -- "$(dirname "$0")")/tap/clock"
     # the outputs in the resulting file for half written lines, eg.
     #   ok 93 - Tes# PERROR - xxxx
     #   t some function
-    if [ "${TAP_AUTOTIME:-}" != 0 ]; then
+    if [ "${LTTNG_TESTS_TAP_AUTOTIME:-}" != 0 ]; then
       stdbuf -eL -oL -- "$@"
     else
       "$@"
index c92c14140e4404b5e506d3571e9029715b8863d2..687ea22f28a9adf7f787dc473b5313d1da129cf3 100644 (file)
@@ -185,16 +185,16 @@ void _tap_init(void)
                setbuf(stdout, 0);
 
                /*
-                * Check if the TAP_AUTOTIME environment variable is set and
-                * contains at least one byte.
+                * Check if the LTTNG_TESTS_TAP_AUTOTIME environment variable
+                * is set and contains at least one byte.
                 */
-               const char *autotime_env = getenv("TAP_AUTOTIME");
+               const char *autotime_env = getenv("LTTNG_TESTS_TAP_AUTOTIME");
                if (autotime_env != NULL && strnlen(autotime_env, 1)) {
                        int tap_autotime;
 
                        /*
-                        * Check if TAP_AUTOTIME is '0', also check errno
-                        * because strtol() can return '0' on error.
+                        * Check if LTTNG_TESTS_TAP_AUTOTIME is '0', also check
+                        * errno because strtol() can return '0' on error.
                         */
                        errno = 0;
                        tap_autotime = strtol(autotime_env, NULL, 10);
index 66499d817ed79d0719d2fa636870ab6bd78a9165..eae7c3a2c2610784d2f45f479883c35329c68223 100755 (executable)
@@ -14,7 +14,7 @@ _test_died=0
 _expected_tests=0
 _executed_tests=0
 _failed_tests=0
-_auto_timing="${TAP_AUTOTIME:-1}"
+_auto_timing="${LTTNG_TESTS_TAP_AUTOTIME:-1}"
 _last_time=''
 TODO=
 TIME_SCRIPT="$(realpath -e -- "$(dirname "${BASH_SOURCE[0]}")")/clock"
index d87cd1e32696807be20314c90f9e043d83eed4fa..7d8dc68197af3919e77f0de9871658ffe9eac655 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") == "0":
+if os.getenv("LTTNG_TESTS_TAP_AUTOTIME", "1") == "0":
     _time_tests = False
 
 
This page took 0.027785 seconds and 4 git commands to generate.