[lldb][gui] move TestGuiBasicDebug.py to lldb/test and update it
authorLuboš Luňák <l.lunak@centrum.cz>
Mon, 3 Aug 2020 05:09:03 +0000 (07:09 +0200)
committerLuboš Luňák <l.lunak@centrum.cz>
Wed, 5 Aug 2020 07:51:13 +0000 (09:51 +0200)
Between the time it was created and it was pushed upstream,
99451b4453688a94c6014cac233d371ab4cc342d has moved the existing
gui gui tests to lldb/test, so move this one too.
And update it to contain TestGuiBasic.py changes since the time
when it was based on that test.

Differential Revision: https://reviews.llvm.org/D85106

lldb/test/API/commands/gui/basicdebug/Makefile [moved from lldb/packages/Python/lldbsuite/test/commands/gui/basicdebug/Makefile with 100% similarity]
lldb/test/API/commands/gui/basicdebug/TestGuiBasicDebug.py [moved from lldb/packages/Python/lldbsuite/test/commands/gui/basicdebug/TestGuiBasicDebug.py with 83% similarity]
lldb/test/API/commands/gui/basicdebug/func.c [moved from lldb/packages/Python/lldbsuite/test/commands/gui/basicdebug/func.c with 100% similarity]
lldb/test/API/commands/gui/basicdebug/main.c [moved from lldb/packages/Python/lldbsuite/test/commands/gui/basicdebug/main.c with 100% similarity]

@@ -11,7 +11,11 @@ class TestGuiBasicDebugCommandTest(PExpectTest):
 
     mydir = TestBase.compute_mydir(__file__)
 
+    # PExpect uses many timeouts internally and doesn't play well
+    # under ASAN on a loaded machine..
+    @skipIfAsan
     @skipIfCursesSupportMissing
+    @skipIfRemote # "run" command will not work correctly for remote debug
     def test_gui(self):
         self.build()
 
@@ -39,4 +43,8 @@ class TestGuiBasicDebugCommandTest(PExpectTest):
         self.child.send("n") # step over
         self.child.expect("return 0;[^\r\n]+<<< Thread 1: step over")
 
+        # Press escape to quit the gui
+        self.child.send(escape_key)
+
+        self.expect_prompt()
         self.quit()