Skip to content

Commit ef5ed1c

Browse files
slydimankrishna2803
authored andcommitted
[BOLT] Fixed cmdline-args.test to work on Windows (llvm#151209)
Added regex to ignore `.exe` in the executable name. Ignored OS-dependent message "No such file or directory".
1 parent 50f8c59 commit ef5ed1c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

bolt/test/binary-analysis/AArch64/cmdline-args.test

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
# Verify that an error message is provided if an input file is missing or incorrect
55

66
RUN: not llvm-bolt-binary-analysis 2>&1 | FileCheck -check-prefix=NOFILEARG %s
7-
NOFILEARG: llvm-bolt-binary-analysis: Not enough positional command line arguments specified!
8-
NOFILEARG-NEXT: Must specify at least 1 positional argument: See: {{.*}}llvm-bolt-binary-analysis --help
7+
NOFILEARG: llvm-bolt-binary-analysis{{(\.exe)?}}: Not enough positional command line arguments specified!
8+
NOFILEARG-NEXT: Must specify at least 1 positional argument: See: {{.*}}llvm-bolt-binary-analysis{{(\.exe)?}} --help
99

1010
RUN: not llvm-bolt-binary-analysis non-existing-file 2>&1 | FileCheck -check-prefix=NONEXISTINGFILEARG %s
11-
NONEXISTINGFILEARG: llvm-bolt-binary-analysis: 'non-existing-file': No such file or directory.
11+
# Don't check the OS-dependent message "No such file or directory".
12+
NONEXISTINGFILEARG: llvm-bolt-binary-analysis{{(\.exe)?}}: 'non-existing-file': {{.*}}
1213

1314
RUN: not llvm-bolt-binary-analysis %p/Inputs/dummy.txt 2>&1 | FileCheck -check-prefix=NOELFFILEARG %s
14-
NOELFFILEARG: llvm-bolt-binary-analysis: '{{.*}}/Inputs/dummy.txt': The file was not recognized as a valid object file.
15+
NOELFFILEARG: llvm-bolt-binary-analysis{{(\.exe)?}}: '{{.*}}/Inputs/dummy.txt': The file was not recognized as a valid object file.
1516

1617
RUN: %clang %cflags -Wl,--emit-relocs %p/../../Inputs/asm_foo.s %p/../../Inputs/asm_main.c -o %t.exe
1718
RUN: llvm-bolt-binary-analysis %t.exe 2>&1 | FileCheck -check-prefix=VALIDELFFILEARG --allow-empty %s
@@ -26,7 +27,7 @@ RUN: llvm-bolt-binary-analysis --help 2>&1 | FileCheck -check-prefix=HELP %s
2627

2728
HELP: OVERVIEW: BinaryAnalysis
2829
HELP-EMPTY:
29-
HELP-NEXT: USAGE: llvm-bolt-binary-analysis [options] <executable>
30+
HELP-NEXT: USAGE: llvm-bolt-binary-analysis{{(\.exe)?}} [options] <executable>
3031
HELP-EMPTY:
3132
HELP-NEXT: OPTIONS:
3233
HELP-EMPTY:

0 commit comments

Comments
 (0)