Skip to content

Commit

Permalink
[lldb/test] Fix wrong target command failure message on Windows
Browse files Browse the repository at this point in the history
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 <medismail.bennani@gmail.com>
  • Loading branch information
medismailben committed May 4, 2020
1 parent 74f2a9a commit 8277dad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lldb/test/API/commands/target/basic/TestTargetCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8277dad

Please sign in to comment.