Skip to content

Commit 01e95dd

Browse files
committed
tests/cstrans-df-run: use its own CMakeLists.txt
1 parent ea5497b commit 01e95dd

File tree

2 files changed

+38
-21
lines changed

2 files changed

+38
-21
lines changed

tests/CMakeLists.txt

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,4 @@ set(test_cost 1048576)
3838
add_subdirectory(csdiff)
3939
add_subdirectory(csgrep)
4040
add_subdirectory(cssort)
41-
42-
# a generic template for cstrans-df-run tests
43-
macro(tests_cstrans_df_run tst)
44-
set(test_data_prefix "${testdir}/cstrans-df-run/${tst}")
45-
set(cmd "${CMAKE_BINARY_DIR}/src/cstrans-df-run")
46-
set(cmd "${cmd} -- /opt/cov-sa-2019.09/bin/cov-build --dir=/cov --append-log")
47-
set(cmd "${cmd} <${test_data_prefix}-stdin.txt")
48-
set(cmd "${cmd} | ${diffcmd} ${test_data_prefix}-stdout.txt -")
49-
add_test_wrap("cstrans-df-run-${tst}" "${cmd}")
50-
endmacro()
51-
52-
# cstrans-df-run tests
53-
tests_cstrans_df_run(0001)
54-
tests_cstrans_df_run(0002)
55-
tests_cstrans_df_run(0003)
56-
tests_cstrans_df_run(0004)
57-
tests_cstrans_df_run(0005)
58-
tests_cstrans_df_run(0006)
59-
tests_cstrans_df_run(0007)
60-
tests_cstrans_df_run(0008)
61-
tests_cstrans_df_run(0009)
41+
add_subdirectory(cstrans-df-run)

tests/cstrans-df-run/CMakeLists.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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 cstrans-df-run tests
19+
macro(tests_cstrans_df_run tst)
20+
set(test_data_prefix "${testdir}/cstrans-df-run/${tst}")
21+
set(cmd "${CMAKE_BINARY_DIR}/src/cstrans-df-run")
22+
set(cmd "${cmd} -- /opt/cov-sa-2019.09/bin/cov-build --dir=/cov --append-log")
23+
set(cmd "${cmd} <${test_data_prefix}-stdin.txt")
24+
set(cmd "${cmd} | ${diffcmd} ${test_data_prefix}-stdout.txt -")
25+
add_test_wrap("cstrans-df-run-${tst}" "${cmd}")
26+
endmacro()
27+
28+
# cstrans-df-run tests
29+
tests_cstrans_df_run(0001)
30+
tests_cstrans_df_run(0002)
31+
tests_cstrans_df_run(0003)
32+
tests_cstrans_df_run(0004)
33+
tests_cstrans_df_run(0005)
34+
tests_cstrans_df_run(0006)
35+
tests_cstrans_df_run(0007)
36+
tests_cstrans_df_run(0008)
37+
tests_cstrans_df_run(0009)

0 commit comments

Comments
 (0)