]> granicus.if.org Git - procps-ng/commitdiff
testsuite: Return error if tty is TTY
authorCraig Small <csmall@dropbear.xyz>
Tue, 22 Mar 2022 08:53:28 +0000 (19:53 +1100)
committerCraig Small <csmall@dropbear.xyz>
Tue, 22 Mar 2022 08:53:28 +0000 (19:53 +1100)
In some build systems, such as the Debian pbuilders, the
environment is strange. The tty is called "TTY" which causes
some of the ps tests to fail.

This commit checks for that specific result and returns ""
so the tests can be bypassed.

Replaces Debian patch fix_checks.

References:
 https://salsa.debian.org/debian/procps/-/blob/debian/2%253.3.17-7/debian/patches/fix_checks

testsuite/config/unix.exp

index ecdc0bf7b86ba27361adf33679ebced0e7e1a6a4..08c446f325600d2b724d1d9065b72261f2c54c36 100644 (file)
@@ -205,5 +205,10 @@ proc get_tty {} {
         return ""
     }
     regexp "/dev/(.+)" $raw_tty > tty
+    if { $tty == "tty" } {
+        warning "TTY is tty"
+        return ""
+    }
+
     return $tty
 }