[llvm] 7598a42 - [Symbolize] Fix llvm-symbolizer --filter-markup test on Windows.

Daniel Thornburgh via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 11:16:21 PDT 2022


Author: Daniel Thornburgh
Date: 2022-06-27T11:16:15-07:00
New Revision: 7598a42e2abcfd72bb742017d185b03fa3bb9bfd

URL: https://github.com/llvm/llvm-project/commit/7598a42e2abcfd72bb742017d185b03fa3bb9bfd
DIFF: https://github.com/llvm/llvm-project/commit/7598a42e2abcfd72bb742017d185b03fa3bb9bfd.diff

LOG: [Symbolize] Fix llvm-symbolizer --filter-markup test on Windows.

The tests use in-band ANSI color codes, while the Windows cmd console
uses an out-of-band interface for color.

Added: 
    llvm/test/tools/llvm-symbolizer/filter-markup-color.test

Modified: 
    llvm/test/tools/llvm-symbolizer/filter-markup.test

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-symbolizer/filter-markup-color.test b/llvm/test/tools/llvm-symbolizer/filter-markup-color.test
new file mode 100644
index 0000000000000..c960baf465483
--- /dev/null
+++ b/llvm/test/tools/llvm-symbolizer/filter-markup-color.test
@@ -0,0 +1,21 @@
+UNSUPPORTED: system-windows
+
+RUN: echo -e "a{{{symbol:foo}}}b\n{{{symbol:bar}}}\n" > %t.input
+
+RUN: llvm-symbolizer --filter-markup --color < %t.input > %t.color
+RUN: FileCheck %s --check-prefix=COLOR --input-file=%t.color --match-full-lines --implicit-check-not {{.}}
+
+RUN: llvm-symbolizer --filter-markup --color=auto < %t.input > %t.autocolor
+RUN: FileCheck %s --check-prefix=NOCOLOR --input-file=%t.autocolor --match-full-lines --implicit-check-not {{.}}
+
+RUN: llvm-symbolizer --filter-markup --color=never < %t.input > %t.nevercolor
+RUN: FileCheck %s --check-prefix=NOCOLOR --input-file=%t.nevercolor --match-full-lines --implicit-check-not {{.}}
+
+RUN: llvm-symbolizer --filter-markup --color=always < %t.input > %t.alwayscolor
+RUN: FileCheck %s --check-prefix=COLOR --input-file=%t.alwayscolor --match-full-lines --implicit-check-not {{.}}
+
+NOCOLOR: afoob
+NOCOLOR: bar
+
+COLOR: a{{.}}[0;34mfoo{{.}}[0mb
+COLOR: {{.}}[0;34mbar{{.}}[0m

diff  --git a/llvm/test/tools/llvm-symbolizer/filter-markup.test b/llvm/test/tools/llvm-symbolizer/filter-markup.test
index 4610994b40ac1..be65adbc03110 100644
--- a/llvm/test/tools/llvm-symbolizer/filter-markup.test
+++ b/llvm/test/tools/llvm-symbolizer/filter-markup.test
@@ -1,21 +1,6 @@
 RUN: echo -e "a{{{symbol:foo}}}b\n{{{symbol:bar}}}\n" > %t.input
-RUN: llvm-symbolizer --filter-markup < %t.input > %t.nocolor
-RUN: FileCheck %s --check-prefix=NOCOLOR --input-file=%t.nocolor --match-full-lines --implicit-check-not {{.}}
+RUN: llvm-symbolizer --filter-markup < %t.input > %t.output
+RUN: FileCheck %s --input-file=%t.output --match-full-lines --implicit-check-not {{.}}
 
-NOCOLOR: afoob
-NOCOLOR: bar
-
-RUN: llvm-symbolizer --filter-markup --color < %t.input > %t.color
-RUN: FileCheck %s --check-prefix=COLOR --input-file=%t.color --match-full-lines --implicit-check-not {{.}}
-
-RUN: llvm-symbolizer --filter-markup --color=auto < %t.input > %t.autocolor
-RUN: FileCheck %s --check-prefix=NOCOLOR --input-file=%t.autocolor --match-full-lines --implicit-check-not {{.}}
-
-RUN: llvm-symbolizer --filter-markup --color=never < %t.input > %t.nevercolor
-RUN: FileCheck %s --check-prefix=NOCOLOR --input-file=%t.nevercolor --match-full-lines --implicit-check-not {{.}}
-
-RUN: llvm-symbolizer --filter-markup --color=always < %t.input > %t.alwayscolor
-RUN: FileCheck %s --check-prefix=COLOR --input-file=%t.alwayscolor --match-full-lines --implicit-check-not {{.}}
-
-COLOR: a{{.}}[0;34mfoo{{.}}[0mb
-COLOR: {{.}}[0;34mbar{{.}}[0m
+CHECK: afoob
+CHECK: bar


        


More information about the llvm-commits mailing list