[Lldb-commits] [PATCH] Fix expectation for TestPlatformCommand.test_shell

Zachary Turner zturner at google.com
Tue Mar 3 09:20:07 PST 2015


Windows stuff looks good
On Tue, Mar 3, 2015 at 8:55 AM Tamas Berghammer <tberghammer at google.com>
wrote:

> Use the target triple to get the expectations
>
>
> http://reviews.llvm.org/D8031
>
> Files:
>   source/API/SBPlatform.cpp
>   test/functionalities/platform/TestPlatformCommand.py
>
> Index: source/API/SBPlatform.cpp
> ===================================================================
> --- source/API/SBPlatform.cpp
> +++ source/API/SBPlatform.cpp
> @@ -378,7 +378,7 @@
>      PlatformSP platform_sp(GetSP());
>      if (platform_sp)
>      {
> -        ArchSpec arch(platform_sp->GetRemoteSystemArchitecture());
> +        ArchSpec arch(platform_sp->GetSystemArchitecture());
>          if (arch.IsValid())
>          {
>              // Const-ify the string so we don't need to worry about the
> lifetime of the string
> 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"):
> +        triple = self.dbg.GetSelectedPlatform().GetTriple()
> +        if re.match(".*-.*-windows", triple):
>            self.expect("platform shell dir c:\\", substrs = ["Windows",
> "Program Files"])
> +        elif re.match(".*-.*-.*-android", triple):
> +          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/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150303/4720ae63/attachment.html>


More information about the lldb-commits mailing list