summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 11:09:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 11:09:23 +0000
commitf73363f1dd94996356cefbf24388f561891acf0b (patch)
treee3c31248bdb36eaec5fd833490d4278162dba2a0 /packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py
parent160ee69dd7ae18978f4068116777639ea98dc951 (diff)
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py')
-rw-r--r--packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py b/packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py
index d562cb1511ac..1698c0d0c35f 100644
--- a/packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py
+++ b/packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py
@@ -8,13 +8,16 @@ from __future__ import print_function
import os
import time
import lldb
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
class CmdPythonTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
+ NO_DEBUG_INFO_TESTCASE = True
+ @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
def test(self):
self.build()
self.pycmd_tests()
@@ -27,7 +30,7 @@ class CmdPythonTestCase(TestBase):
self.expect('targetname',
substrs=['a.out'], matching=False, error=True)
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.expect("file " + exe,
patterns=["Current executable set to .*a.out"])
@@ -46,6 +49,7 @@ class CmdPythonTestCase(TestBase):
self.runCmd('command script delete tell_curr', check=False)
self.runCmd('command script delete bug11569', check=False)
self.runCmd('command script delete takes_exe_ctx', check=False)
+ self.runCmd('command script delete decorated', check=False)
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
@@ -64,13 +68,19 @@ class CmdPythonTestCase(TestBase):
substrs=['Just a docstring for welcome_impl',
'A command that says hello to LLDB users'])
+ decorated_commands = ["decorated" + str(n) for n in range(1, 5)]
+ for name in decorated_commands:
+ self.expect(name, substrs=["hello from " + name])
+ self.expect("help " + name,
+ substrs=["Python command defined by @lldb.command"])
+
self.expect("help",
substrs=['For more information run',
- 'welcome'])
+ 'welcome'] + decorated_commands)
self.expect("help -a",
substrs=['For more information run',
- 'welcome'])
+ 'welcome'] + decorated_commands)
self.expect("help -u", matching=False,
substrs=['For more information run'])