Use skipIf instead of skipUnless in TestTerminal for better readability.
authorChaoren Lin <chaorenl@google.com>
Sat, 6 Jun 2015 14:51:34 +0000 (14:51 +0000)
committerChaoren Lin <chaorenl@google.com>
Sat, 6 Jun 2015 14:51:34 +0000 (14:51 +0000)
llvm-svn: 239220

lldb/test/functionalities/tty/TestTerminal.py

index 8777756..3905459 100644 (file)
@@ -20,7 +20,7 @@ class LaunchInTerminalTestCase(TestBase):
 
     # If the test is being run under sudo, the spawned terminal won't retain that elevated
     # privilege so it can't open the socket to talk back to the test case
-    @unittest2.skipUnless(not hasattr(os, 'geteuid') or os.geteuid() != 0,
+    @unittest2.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0,
             "test cannot be run as root")
 
     # Do we need to disable this test if the testsuite is being run on a remote system?