Skip to content

Commit f9ac479

Browse files
committed
tests/cssort: separate subdir for cssort tests
1 parent 6088d9f commit f9ac479

25 files changed

+4886
-25
lines changed

tests/CMakeLists.txt

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2011 Red Hat, Inc.
1+
# Copyright (C) 2011 - 2020 Red Hat, Inc.
22
#
33
# This file is part of csdiff.
44
#
@@ -36,6 +36,7 @@ endmacro()
3636
set(test_cost 1048576)
3737

3838
add_subdirectory(csdiff)
39+
add_subdirectory(cssort)
3940

4041
# a generic template for csparser test-cases
4142
macro(test_csparser dir num)
@@ -61,19 +62,6 @@ macro(test_csgrep dir num)
6162
add_test_wrap("${dir}-${num}" "${cmd}")
6263
endmacro()
6364

64-
# a generic template for cssort test-cases
65-
macro(test_cssort dir num)
66-
set(tst "${testdir}/${dir}/${num}")
67-
68-
set(cmd "${cssort} --key=checker ${tst}-input.err 2>/dev/null")
69-
set(cmd "${cmd} | ${jsfilter} | ${diffcmd} ${tst}-by-checker.err -")
70-
add_test_wrap("${dir}-${num}-by-checker" "${cmd}")
71-
72-
set(cmd "${cssort} --key=path ${tst}-input.err 2>/dev/null")
73-
set(cmd "${cmd} | ${jsfilter} | ${diffcmd} ${tst}-by-path.err -")
74-
add_test_wrap("${dir}-${num}-by-path" "${cmd}")
75-
endmacro()
76-
7765
# a generic template for cstrans-df-run tests
7866
macro(tests_cstrans_df_run tst)
7967
set(test_data_prefix "${testdir}/cstrans-df-run/${tst}")
@@ -155,13 +143,6 @@ test_csparser(csparser-5.8 00)
155143
test_csparser(csparser-5.8 01)
156144
test_csparser(csparser-5.8 02)
157145

158-
# cssort tests
159-
test_cssort(cssort-5.8 00)
160-
test_cssort(cssort-5.8 01)
161-
test_cssort(cssort-5.8 02)
162-
test_cssort(cssort-5.8 03)
163-
test_cssort(cssort-misc 00)
164-
165146
# cstrans-df-run tests
166147
tests_cstrans_df_run(0001)
167148
tests_cstrans_df_run(0002)

tests/cssort-5.8/00-input.err

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/cssort-5.8/01-input.err

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/cssort-5.8/02-input.err

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/cssort/CMakeLists.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (C) 2011 - 2020 Red Hat, Inc.
2+
#
3+
# This file is part of csdiff.
4+
#
5+
# csdiff is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# any later version.
9+
#
10+
# csdiff is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU General Public License
16+
# along with csdiff. If not, see <http://www.gnu.org/licenses/>.
17+
18+
# a generic template for cssort test-cases
19+
macro(test_cssort dir num)
20+
set(tst "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${num}")
21+
22+
set(cmd "${cssort} --key=checker ${tst}-input.err 2>/dev/null")
23+
set(cmd "${cmd} | ${jsfilter} | ${diffcmd} ${tst}-by-checker.err -")
24+
add_test_wrap("${dir}-${num}-by-checker" "${cmd}")
25+
26+
set(cmd "${cssort} --key=path ${tst}-input.err 2>/dev/null")
27+
set(cmd "${cmd} | ${jsfilter} | ${diffcmd} ${tst}-by-path.err -")
28+
add_test_wrap("${dir}-${num}-by-path" "${cmd}")
29+
endmacro()
30+
31+
# cssort tests
32+
test_cssort(cssort-5.8 00)
33+
test_cssort(cssort-5.8 01)
34+
test_cssort(cssort-5.8 02)
35+
test_cssort(cssort-5.8 03)
36+
test_cssort(cssort-misc 00)

tests/cssort/cssort-5.8/00-input.err

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kernel-2.6.18-296.el5-snippet.err

0 commit comments

Comments
 (0)