@@ -36,32 +36,9 @@ endmacro()
3636set (test_cost 1048576)
3737
3838add_subdirectory (csdiff)
39+ add_subdirectory (csgrep)
3940add_subdirectory (cssort)
4041
41- # a generic template for csparser test-cases
42- macro (test_csparser dir num)
43- set (tst "${testdir} /${dir} /${num} " )
44-
45- set (cmd "${csgrep} ${tst} -stdin.txt 2>/dev/null" )
46- set (cmd "${cmd} | ${diffcmd} ${tst} -stdout.txt -" )
47- add_test_wrap("${dir} -${num} -stdout" "${cmd} " )
48-
49- set (cmd "${csgrep} ${tst} -stdin.txt 2>&1 >/dev/null" )
50- set (cmd "${cmd} | sed -s 's|^[^:]*/||' | ${diffcmd} ${tst} -stderr.txt -" )
51- add_test_wrap("${dir} -${num} -stderr" "${cmd} " )
52- endmacro ()
53-
54- # a generic template for csgrep test-cases
55- macro (test_csgrep dir num)
56- set (tst "${testdir} /${dir} /${num} " )
57-
58- file (READ ${tst} -args.txt args)
59- string (REPLACE "\n " "" args "${args} " )
60- set (cmd "${csgrep} ${args} ${tst} -stdin.txt" )
61- set (cmd "${cmd} | ${jsfilter} | ${diffcmd} ${tst} -stdout.txt -" )
62- add_test_wrap("${dir} -${num} " "${cmd} " )
63- endmacro ()
64-
6542# a generic template for cstrans-df-run tests
6643macro (tests_cstrans_df_run tst)
6744 set (test_data_prefix "${testdir} /cstrans-df-run/${tst} " )
@@ -72,77 +49,6 @@ macro(tests_cstrans_df_run tst)
7249 add_test_wrap("cstrans-df-run-${tst} " "${cmd} " )
7350endmacro ()
7451
75- # csgrep tests
76- test_csgrep(csgrep "00-exclude-conftest" )
77- test_csgrep(csgrep "01-remove-duplicates" )
78- test_csgrep(csgrep "02-compiler-warnings" )
79- test_csgrep(csgrep "03-compiler-warnings" )
80- test_csgrep(csgrep "04-compiler-warnings" )
81- test_csgrep(csgrep "05-compiler-warnings" )
82- test_csgrep(csgrep "06-cppcheck-warnings" )
83- test_csgrep(csgrep "07-cppcheck-warnings" )
84- test_csgrep(csgrep "08-cppcheck-warnings" )
85- test_csgrep(csgrep "09-err-file-comments" )
86- test_csgrep(csgrep "10-err-file-comments" )
87- test_csgrep(csgrep "11-err-file-comments" )
88- test_csgrep(csgrep "12-llvm-build-warnings" )
89- test_csgrep(csgrep "13-llvm-build-warnings" )
90- test_csgrep(csgrep "14-llvm-build-warnings" )
91- test_csgrep(csgrep "15-llvm-build-warnings" )
92- test_csgrep(csgrep "16-compiler-warnings" )
93- test_csgrep(csgrep "17-compiler-warnings" )
94- test_csgrep(csgrep "18-compiler-warnings" )
95- test_csgrep(csgrep "19-clang-warnings" )
96- test_csgrep(csgrep "20-clang-warnings" )
97- test_csgrep(csgrep "21-compiler-warnings" )
98- test_csgrep(csgrep "22-compiler-warnings" )
99- test_csgrep(csgrep "23-clang-warnings" )
100- test_csgrep(csgrep "24-compiler-warnings" )
101- test_csgrep(csgrep "25-compiler-warnings" )
102- test_csgrep(csgrep "26-cov-format-errors" )
103- test_csgrep(csgrep "27-cov-format-errors" )
104- test_csgrep(csgrep "28-cov-format-errors" )
105- test_csgrep(csgrep "29-cov-format-errors" )
106- test_csgrep(csgrep "30-prospector-raw" )
107- test_csgrep(csgrep "31-prospector-err" )
108- test_csgrep(csgrep "32-shellcheck-raw" )
109- test_csgrep(csgrep "33-cov-format-errors" )
110- test_csgrep(csgrep "34-csgrep-color" )
111- test_csgrep(csgrep "35-cov-format-errors" )
112- test_csgrep(csgrep "36-csgrep-json" )
113- test_csgrep(csgrep "37-csgrep-json" )
114- test_csgrep(csgrep "38-csparser-remediation" )
115- test_csgrep(csgrep "39-csparser-remediation" )
116- test_csgrep(csgrep "40-csparser-code-snippet" )
117- test_csgrep(csgrep "41-gcc-parser-pylint" )
118- test_csgrep(csgrep "42-gcc-parser-smatch" )
119- test_csgrep(csgrep "43-gcc-parser-smatch" )
120- test_csgrep(csgrep "44-csparser-new-key-evts" )
121- test_csgrep(csgrep "45-gcc-parser-clang" )
122- test_csgrep(csgrep "46-cov-json-v2" )
123- test_csgrep(csgrep "47-csparser-new-key-evts" )
124- test_csgrep(csgrep "48-csparser-missing-break-key-evt" )
125- test_csgrep(csgrep "49-csparser-findbugs-jsr166" )
126- test_csgrep(csgrep "50-gcc-parser-gcc-9.2.1" )
127- test_csgrep(csgrep "51-gcc-parser-systemd" )
128- test_csgrep(csgrep "52-gcc-parser-clang-nss" )
129- test_csgrep(csgrep "53-csparser-note-events" )
130- test_csgrep(csgrep "54-csparser-unknown-lineno" )
131- test_csgrep(csgrep "55-csparser-pylint-copr" )
132- test_csgrep(csgrep "56-gcc-sparser-clang-error" )
133- test_csgrep(csgrep "57-gcc-parser-gcc-analyzer-curl" )
134- test_csgrep(csgrep "58-csparser-gcc-analyzer-curl" )
135- test_csgrep(csgrep "59-json-parser-cov-v7-cwe" )
136- test_csgrep(csgrep "60-gcc-parser-cppcheck-cwe" )
137- test_csgrep(csgrep "61-json-parser-cov-v7-lang" )
138- test_csgrep(csgrep "62-csparser-checker-lang" )
139- test_csgrep(csgrep "63-gcc-parser-checker-lang" )
140- test_csgrep(csgrep "64-json-parser-unknown-node" )
141- test_csgrep(csgrep "65-gcc-parser-clang-warn-suff" )
142- test_csparser(csparser-5.8 00)
143- test_csparser(csparser-5.8 01)
144- test_csparser(csparser-5.8 02)
145-
14652# cstrans-df-run tests
14753tests_cstrans_df_run(0001)
14854tests_cstrans_df_run(0002)
0 commit comments