Hi zturner, clayborg,

Fix expectation for TestPlatformCommand.test_shell
    
* Create expectation based on target platform
* Add custom expectation for remote android target

http://reviews.llvm.org/D8031

Files:
  test/functionalities/platform/TestPlatformCommand.py

Index: test/functionalities/platform/TestPlatformCommand.py
===================================================================
--- test/functionalities/platform/TestPlatformCommand.py
+++ test/functionalities/platform/TestPlatformCommand.py
@@ -33,8 +33,11 @@
 
     def test_shell(self):
         """ Test that the platform shell command can invoke ls. """
-        if sys.platform.startswith("win32"):
+        platform_name = self.dbg.GetSelectedPlatform().GetName()
+        if platform_name == "remote-windows" or (platform_name == "host" and 
sys.platform.startswith("win32")):
           self.expect("platform shell dir c:\\", substrs = ["Windows", 
"Program Files"])
+        elif platform_name == "remote-android":
+          self.expect("platform shell ls /", substrs = ["cache", "dev", 
"system"])
         else:
           self.expect("platform shell ls /", substrs = ["dev", "tmp", "usr"])

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: test/functionalities/platform/TestPlatformCommand.py
===================================================================
--- test/functionalities/platform/TestPlatformCommand.py
+++ test/functionalities/platform/TestPlatformCommand.py
@@ -33,8 +33,11 @@
 
     def test_shell(self):
         """ Test that the platform shell command can invoke ls. """
-        if sys.platform.startswith("win32"):
+        platform_name = self.dbg.GetSelectedPlatform().GetName()
+        if platform_name == "remote-windows" or (platform_name == "host" and sys.platform.startswith("win32")):
           self.expect("platform shell dir c:\\", substrs = ["Windows", "Program Files"])
+        elif platform_name == "remote-android":
+          self.expect("platform shell ls /", substrs = ["cache", "dev", "system"])
         else:
           self.expect("platform shell ls /", substrs = ["dev", "tmp", "usr"])
 
_______________________________________________
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to