Skip to content

Commit 852eec9

Browse files
author
Vollstrecker
committed
chore: prefixed tests to make chainbuilding easier
1 parent d6fbd91 commit 852eec9

2 files changed

Lines changed: 22 additions & 20 deletions

File tree

test/integration/CMakeLists.txt

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ foreach(test ${tests})
1414
message(STATUS "Adding install integration test: ${test_name}")
1515
# Configure
1616
add_test(
17-
NAME ${test_name}-configure
17+
NAME cryptopp-${test_name}-configure
1818
COMMAND
1919
${CMAKE_COMMAND}
2020
# Always use ninja, never the visual studio generator (bugged)
@@ -44,28 +44,30 @@ foreach(test ${tests})
4444
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
4545

4646
# Build
47-
add_test(NAME ${test_name}-build
47+
add_test(NAME cryptopp-${test_name}-build
4848
COMMAND ${CMAKE_COMMAND} --build
4949
"${CMAKE_CURRENT_BINARY_DIR}/${test_name}-test"
5050
--config ${CMAKE_BUILD_TYPE})
51-
set_tests_properties(${test_name}-build PROPERTIES DEPENDS
52-
${test_name}-configure)
51+
set_tests_properties(cryptopp-${test_name}-build PROPERTIES DEPENDS
52+
cryptopp-${test_name}-configure)
5353

5454
# Install
5555
add_test(
56-
NAME ${test_name}-install
56+
NAME cryptopp-${test_name}-install
5757
COMMAND ${CMAKE_COMMAND} --build
5858
"${CMAKE_CURRENT_BINARY_DIR}/${test_name}-test" --target install
5959
--config ${CMAKE_BUILD_TYPE})
60+
set_tests_properties(cryptopp-${test_name}-install PROPERTIES DEPENDS
61+
cryptopp-${test_name}-build)
6062

6163
# Check installed files
6264
add_test(
63-
NAME ${test_name}-checks
65+
NAME cryptopp-${test_name}-checks
6466
COMMAND ${CMAKE_COMMAND} --build
6567
"${CMAKE_CURRENT_BINARY_DIR}/${test_name}-test" --target do-checks
6668
--config ${CMAKE_BUILD_TYPE})
67-
set_tests_properties(${test_name}-checks PROPERTIES DEPENDS
68-
${test_name}-install)
69+
set_tests_properties(cryptopp-${test_name}-checks PROPERTIES DEPENDS
70+
cryptopp-${test_name}-install)
6971
endforeach()
7072

7173
# ------------------------------------------------------------------------------
@@ -76,7 +78,7 @@ set(test_name "int-find-package")
7678

7779
# Configure
7880
add_test(
79-
NAME ${test_name}-configure
81+
NAME cryptopp-${test_name}-configure
8082
COMMAND
8183
${CMAKE_COMMAND}
8284
# Always use ninja, never the visual studio generator (bugged)
@@ -95,16 +97,16 @@ add_test(
9597
# Replicate the build-type
9698
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
9799

98-
set_tests_properties(${test_name}-configure
99-
PROPERTIES DEPENDS "int-install-default-install")
100+
set_tests_properties(cryptopp-${test_name}-configure
101+
PROPERTIES DEPENDS "cryptopp-int-install-default-install")
100102

101103
# Build
102-
add_test(NAME ${test_name}-build
104+
add_test(NAME cryptopp-${test_name}-build
103105
COMMAND ${CMAKE_COMMAND} --build
104106
"${CMAKE_CURRENT_BINARY_DIR}/${test_name}-test"
105107
--config ${CMAKE_BUILD_TYPE})
106-
set_tests_properties(${test_name}-build PROPERTIES DEPENDS
107-
${test_name}-configure)
108+
set_tests_properties(cryptopp-${test_name}-build PROPERTIES DEPENDS
109+
cryptopp-${test_name}-configure)
108110

109-
set_tests_properties(int-install-prefix-configure
110-
PROPERTIES DEPENDS "int-find-package-build")
111+
set_tests_properties(cryptopp-int-install-prefix-configure
112+
PROPERTIES DEPENDS "cryptopp-int-find-package-build")

test/unit/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ foreach(test ${tests})
1010
message(STATUS "Adding unit test: ${test_name}")
1111
# Configure
1212
add_test(
13-
NAME ${test_name}-configure
13+
NAME cryptopp-${test_name}-configure
1414
COMMAND
1515
${CMAKE_COMMAND}
1616
# Always use ninja, never the visual studio generator (bugged)
@@ -31,10 +31,10 @@ foreach(test ${tests})
3131
# Enable verbose makefiles so we can see the full compile command line
3232
-D CMAKE_VERBOSE_MAKEFILE=ON)
3333
# Build
34-
add_test(NAME ${test_name}-build
34+
add_test(NAME cryptopp-${test_name}-build
3535
COMMAND ${CMAKE_COMMAND} --build
3636
"${CMAKE_CURRENT_BINARY_DIR}/${test_name}-test")
3737
# Run build test case after the configure test case
38-
set_tests_properties(${test_name}-build PROPERTIES DEPENDS
39-
${test_name}-configure)
38+
set_tests_properties(cryptopp-${test_name}-build PROPERTIES DEPENDS
39+
cryptopp-${test_name}-configure)
4040
endforeach()

0 commit comments

Comments
 (0)