From 6a3116415b04f040e2034ae578667e11418081b0 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 8 Jul 2016 23:06:38 +0000 Subject: When calling "settings set target.source-map ", make sure that exists before accepting it as a remapping. We had some clients that had added old source paths remappings to their .lldbinit files and they were causing trouble at a later date. This fix should help mitigate these issues. llvm-svn: 274948 --- .../Python/lldbsuite/test/source-manager/TestSourceManager.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py') diff --git a/lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py b/lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py index d927ea1e15f..93e1789103c 100644 --- a/lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py +++ b/lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py @@ -88,6 +88,10 @@ class SourceManagerTestCase(TestBase): system([["ls"]]) system([["ls", "hidden"]]) + # Set source remapping with invalid replace path and verify we get an error + self.expect("settings set target.source-map /a/b/c/d/e /q/r/s/t/u", error=True, + substrs = ['''error: the replacement path doesn't exist: "/q/r/s/t/u"''']) + # Set target.source-map settings. self.runCmd("settings set target.source-map %s %s" % (os.getcwd(), os.path.join(os.getcwd(), "hidden"))) # And verify that the settings work. -- cgit v1.2.3