From: Med Ismail Bennani Date: Mon, 4 May 2020 17:17:10 +0000 (+0200) Subject: [lldb/test] Fix wrong target command failure message on Windows X-Git-Tag: llvmorg-12-init~7041 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b8d6f44592cd975919d535483c2aca7cd7857b8;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/lldb/test/API/commands/target/basic/TestTargetCommand.py b/lldb/test/API/commands/target/basic/TestTargetCommand.py index 8335753..2704e0ed 100644 --- a/lldb/test/API/commands/target/basic/TestTargetCommand.py +++ b/lldb/test/API/commands/target/basic/TestTargetCommand.py @@ -326,7 +326,7 @@ class targetCommandTestCase(TestBase): @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 @@ class targetCommandTestCase(TestBase): @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