[Lldb-commits] [PATCH] Get test/types tests passing on remote targets

Oleksiy Vyalov ovyalov at google.com
Wed Jan 28 15:42:04 PST 2015


================
Comment at: test/types/AbstractBase.py:94
@@ +93,3 @@
+            # process launch -o requires a path that is valid on the target
+            self.assertNotEqual(None, lldb.remote_platform_working_dir)
+            remote_path = '"{work}/lldb-stdout-redirect.txt"'.format(work=lldb.remote_platform_working_dir)
----------------
You may use assertIsNotNone here.

================
Comment at: test/types/AbstractBase.py:94
@@ +93,3 @@
+            # process launch -o requires a path that is valid on the target
+            self.assertNotEqual(None, lldb.remote_platform_working_dir)
+            remote_path = '"{work}/lldb-stdout-redirect.txt"'.format(work=lldb.remote_platform_working_dir)
----------------
ovyalov wrote:
> You may use assertIsNotNone here.
https://github.com/llvm-mirror/lldb/blob/29b7ef5538c8f186ae9d5aa2758cebc1d1947c7e/test/lldbtest.py#L1681

It should not be a big deal but it seems lldb.remote_platform_working_dir is considered to be a main root directory and lldb.remote_platform.GetWorkingDirectory is a single test root. So, lldb.remote_platform.GetWorkingDirectory() might be a slightly more fine-grained option here.

================
Comment at: test/types/AbstractBase.py:96
@@ +95,3 @@
+            remote_path = '"{work}/lldb-stdout-redirect.txt"'.format(work=lldb.remote_platform_working_dir)
+            self.runCmd('process launch -o {remote}'.format(remote=remote_path))
+            # copy remote_path to local host
----------------
s/process launch/platform process launch ?

================
Comment at: test/types/AbstractBase.py:184
@@ +183,3 @@
+        # process launch command output redirect always goes to host the process is running on
+        if lldb.remote_platform:
+            # process launch -o requires a path that is valid on the target
----------------
Could you extract this logic into a separate method to use it here and within generic_type_tester?

http://reviews.llvm.org/D7221

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list