+
+ /*
+ * Check if the LTTNG_TESTS_TAP_AUTOTIME environment variable
+ * is set and contains at least one byte.
+ */
+ const char *autotime_env = getenv("LTTNG_TESTS_TAP_AUTOTIME");
+ if (autotime_env != NULL && strnlen(autotime_env, 1)) {
+ int tap_autotime;
+
+ /*
+ * 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);
+ if (tap_autotime == 0 && errno == 0) {
+ time_tests = 0;
+ }
+ }
+