summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-01-21 00:40:27 +0000
committerZachary Turner <zturner@google.com>2015-01-21 00:40:27 +0000
commit83887fb7dce2620e59027d66e02d6dee597424f6 (patch)
tree3f6b93a69f50ee61633127dde3c768c56509800d
parent21a886936b796752acf1db1b7ed5f8aa06b2b771 (diff)
downloadbcm5719-llvm-83887fb7dce2620e59027d66e02d6dee597424f6.tar.gz
bcm5719-llvm-83887fb7dce2620e59027d66e02d6dee597424f6.zip
Fix some platform specific paths in TestSettings.py.
We were referring to hardcoded paths /bin/ls and /bin/cat. For the purposes of this test, the actual value it's set to doesn't matter, and it might as well be a non-existent path. All that matters is that the before and after values have to match, and that trailing whitespace is stripped. On Windows FileSpec (correctly) converts /bin/ls to D:\bin\ls though, so the before and after values won't match. So this patch just correctly builds up a valid path in a platform-agnostic manner, and verifies that it matches before and after the set. llvm-svn: 226625
-rw-r--r--lldb/test/settings/TestSettings.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/lldb/test/settings/TestSettings.py b/lldb/test/settings/TestSettings.py
index 14054c17ddf..27fa8964727 100644
--- a/lldb/test/settings/TestSettings.py
+++ b/lldb/test/settings/TestSettings.py
@@ -373,10 +373,14 @@ class SettingsCommandTestCase(TestBase):
startstr = 'target.arg0 (string) = "cde"')
self.runCmd("settings clear target.arg0", check=False)
# file
- self.runCmd ("settings set target.output-path /bin/ls") # Set to known value
- self.runCmd ("settings set target.output-path /bin/cat ") # Set to new value with trailing whitespaces
+ path1 = os.path.join(os.getcwd(), "path1.txt")
+ path2 = os.path.join(os.getcwd(), "path2.txt")
+ self.runCmd ("settings set target.output-path %s" % path1) # Set to known value
self.expect ("settings show target.output-path", SETTING_MSG("target.output-path"),
- startstr = 'target.output-path (file) = ', substrs=['/bin/cat"'])
+ startstr = 'target.output-path (file) = ', substrs=[path1])
+ self.runCmd ("settings set target.output-path %s " % path2) # Set to new value with trailing whitespaces
+ self.expect ("settings show target.output-path", SETTING_MSG("target.output-path"),
+ startstr = 'target.output-path (file) = ', substrs=[path2])
self.runCmd("settings clear target.output-path", check=False)
# enum
self.runCmd ("settings set stop-disassembly-display never") # Set to known value
OpenPOWER on IntegriCloud