From f73363f1dd94996356cefbf24388f561891acf0b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 28 Jul 2018 11:09:23 +0000 Subject: Vendor import of lldb trunk r338150: https://llvm.org/svn/llvm-project/lldb/trunk@338150 --- .../functionalities/command_script/TestCommandScript.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py') 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']) -- cgit v1.2.3