From 8277dad5895f7ce4423795271b6e73c805825818 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Mon, 4 May 2020 19:17:10 +0200 Subject: [PATCH] [lldb/test] Fix wrong target command failure message on Windows This patch fixes the test failure happening on Windows introduced by `015117411e11458f9816ba4359246132164a4297`. Since the failure message comes from the OS, the test needs to support both UNIX and Windows messages. Signed-off-by: Med Ismail Bennani --- lldb/test/API/commands/target/basic/TestTargetCommand.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/test/API/commands/target/basic/TestTargetCommand.py b/lldb/test/API/commands/target/basic/TestTargetCommand.py index 8f6b82c79e4c3b..730b43b708cb54 100644 --- a/lldb/test/API/commands/target/basic/TestTargetCommand.py +++ b/lldb/test/API/commands/target/basic/TestTargetCommand.py @@ -326,7 +326,7 @@ def test_target_create_multiple_args(self): @no_debug_info_test def test_target_create_nonexistent_core_file(self): self.expect("target create -c doesntexist", error=True, - substrs=["Cannot open 'doesntexist': No such file or directory"]) + patterns=["Cannot open 'doesntexist'", ": (No such file or directory|The system cannot find the file specified)"]) # Write only files don't seem to be supported on Windows. @skipIfWindows @@ -340,7 +340,7 @@ def test_target_create_unreadable_core_file(self): @no_debug_info_test def test_target_create_nonexistent_sym_file(self): self.expect("target create -s doesntexist doesntexisteither", error=True, - substrs=["Cannot open '", "': No such file or directory"]) + patterns=["Cannot open '", ": (No such file or directory|The system cannot find the file specified)"]) @skipIfWindows @no_debug_info_test