summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2016-07-08 23:06:38 +0000
committerGreg Clayton <gclayton@apple.com>2016-07-08 23:06:38 +0000
commit6a3116415b04f040e2034ae578667e11418081b0 (patch)
tree4b3adc9b2e75ef3816c7222530391788b40d3b32 /lldb/packages/Python/lldbsuite/test
parent3b77612839390d0dc6ebe3c8cb570dddae124fcf (diff)
downloadbcm5719-llvm-6a3116415b04f040e2034ae578667e11418081b0.tar.gz
bcm5719-llvm-6a3116415b04f040e2034ae578667e11418081b0.zip
When calling "settings set target.source-map <old-path> <new-path>", make sure that <new-path> 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. <rdar://problem/26358860> llvm-svn: 274948
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py4
1 files changed, 4 insertions, 0 deletions
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.
OpenPOWER on IntegriCloud