aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-05-04 09:05:59 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-05-04 09:11:19 +0300
commit9c110e2771884de4f0c65386d2812b9bc559bc4b (patch)
treeef8b43a0826b493dfb427e46b18cc43f1be6bab9 /test
parentupdate cmake-common (diff)
downloadaes-tools-9c110e2771884de4f0c65386d2812b9bc559bc4b.tar.gz
aes-tools-9c110e2771884de4f0c65386d2812b9bc559bc4b.zip
test: use ctest-driver.py
Diffstat (limited to '')
-rw-r--r--test/CMakeLists.txt68
1 files changed, 47 insertions, 21 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c713ca4..26c0a58 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,23 +1,49 @@
find_package(Python3 REQUIRED COMPONENTS Interpreter)
-add_test(NAME nist COMMAND Python3::Interpreter "${CMAKE_CURRENT_SOURCE_DIR}/nist.py" --path "$<TARGET_FILE_DIR:util_encrypt_block>")
-add_test(NAME nist_boxes COMMAND Python3::Interpreter "${CMAKE_CURRENT_SOURCE_DIR}/nist.py" --path "$<TARGET_FILE_DIR:util_encrypt_block>" --boxes)
-add_test(NAME cavp COMMAND Python3::Interpreter "${CMAKE_CURRENT_SOURCE_DIR}/cavp.py" --path "$<TARGET_FILE_DIR:util_encrypt_block>")
-add_test(NAME cavp_boxes COMMAND Python3::Interpreter "${CMAKE_CURRENT_SOURCE_DIR}/cavp.py" --path "$<TARGET_FILE_DIR:util_encrypt_block>" --boxes)
-add_test(NAME file COMMAND Python3::Interpreter "${CMAKE_CURRENT_SOURCE_DIR}/file.py" --path "$<TARGET_FILE_DIR:util_encrypt_file>")
-
-set_tests_properties(nist PROPERTIES
- FAIL_REGULAR_EXPRESSION "Failed: *[1-9]"
- PASS_REGULAR_EXPRESSION "Succeeded: *30")
-set_tests_properties(nist_boxes PROPERTIES
- FAIL_REGULAR_EXPRESSION "Failed: *[1-9]"
- PASS_REGULAR_EXPRESSION "Succeeded: *30")
-set_tests_properties(cavp PROPERTIES
- FAIL_REGULAR_EXPRESSION "Failed: *[1-9]"
- PASS_REGULAR_EXPRESSION "Succeeded: *96")
-set_tests_properties(cavp_boxes PROPERTIES
- FAIL_REGULAR_EXPRESSION "Failed: *[1-9]"
- PASS_REGULAR_EXPRESSION "Succeeded: *96")
-set_tests_properties(file PROPERTIES
- FAIL_REGULAR_EXPRESSION "Failed: *[1-9]"
- PASS_REGULAR_EXPRESSION "Succeeded: *180")
+add_test(NAME nist COMMAND Python3::Interpreter
+ "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/tools/ctest-driver.py"
+ run
+ --pass-regex [=[Succeeded: *30$]=]
+ --fail-regex [=[Failed: *[1-9]]=]
+ --
+ "$<TARGET_FILE:Python3::Interpreter>"
+ "${CMAKE_CURRENT_SOURCE_DIR}/nist.py"
+ --path "$<TARGET_FILE_DIR:util_encrypt_block>")
+add_test(NAME nist_boxes COMMAND Python3::Interpreter
+ "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/tools/ctest-driver.py"
+ run
+ --pass-regex [=[Succeeded: *30$]=]
+ --fail-regex [=[Failed: *[1-9]]=]
+ --
+ "$<TARGET_FILE:Python3::Interpreter>"
+ "${CMAKE_CURRENT_SOURCE_DIR}/nist.py"
+ --path "$<TARGET_FILE_DIR:util_encrypt_block>"
+ --boxes)
+add_test(NAME cavp COMMAND Python3::Interpreter
+ "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/tools/ctest-driver.py"
+ run
+ --pass-regex [=[Succeeded: *96$]=]
+ --fail-regex [=[Failed: *[1-9]]=]
+ --
+ "$<TARGET_FILE:Python3::Interpreter>"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cavp.py"
+ --path "$<TARGET_FILE_DIR:util_encrypt_block>")
+add_test(NAME cavp_boxes COMMAND Python3::Interpreter
+ "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/tools/ctest-driver.py"
+ run
+ --pass-regex [=[Succeeded: *96$]=]
+ --fail-regex [=[Failed: *[1-9]]=]
+ --
+ "$<TARGET_FILE:Python3::Interpreter>"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cavp.py"
+ --path "$<TARGET_FILE_DIR:util_encrypt_block>"
+ --boxes)
+add_test(NAME file COMMAND Python3::Interpreter
+ "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/tools/ctest-driver.py"
+ run
+ --pass-regex [=[Succeeded: *180$]=]
+ --fail-regex [=[Failed: *[1-9]]=]
+ --
+ "$<TARGET_FILE:Python3::Interpreter>"
+ "${CMAKE_CURRENT_SOURCE_DIR}/file.py"
+ --path "$<TARGET_FILE_DIR:util_encrypt_file>")