aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml26
-rw-r--r--CMakeLists.txt4
-rw-r--r--test/CMakeLists.txt6
3 files changed, 13 insertions, 23 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a954dfa..9ba227e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -62,28 +62,8 @@ jobs:
with:
name: 'aes-tools-${{ matrix.os }}-${{ matrix.toolset }}-${{ matrix.platform }}-asm${{ matrix.use_asm }}-${{ matrix.configuration }}'
path: '${{ runner.workspace }}/build/install/'
- - name: Run test/nist.py
+ - name: Test
run: |
- python test/nist.py --path ../build/install/bin --log test/nist.log
- Get-Content test/nist.log -Tail 5
- if: runner.os == 'Windows'
- - name: Run test/cavp.py
- run: |
- python test/cavp.py --path ../build/install/bin --log test/cavp.log
- Get-Content test/cavp.log -Tail 5
- if: runner.os == 'Windows'
- - name: Run test/nist.py --boxes
- run: |
- python test/nist.py --path ../build/install/bin --log test/nist.log --boxes
- Get-Content test/nist.log -Tail 5
- if: runner.os == 'Windows'
- - name: Run test/cavp.py --boxes
- run: |
- python test/cavp.py --path ../build/install/bin --log test/cavp.log --boxes
- Get-Content test/cavp.log -Tail 5
- if: runner.os == 'Windows'
- - name: Run test/file.py
- run: |
- python test/file.py --path ../build/install/bin --log test/file.log
- Get-Content test/file.log -Tail 5
+ cd ../build/cmake
+ ctest -C '${{ env.CONFIGURATION }}' --verbose
if: runner.os == 'Windows'
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 232aeb7..5553e60 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,9 +2,13 @@ cmake_minimum_required(VERSION 3.5) # for Boost::* imported targets
project(aes_tools C CXX)
+enable_testing()
+
include(cmake/common.cmake)
add_subdirectory(aes)
add_subdirectory(aesxx)
+add_subdirectory(test)
+
install(FILES LICENSE.txt DESTINATION share)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
new file mode 100644
index 0000000..7156ac8
--- /dev/null
+++ b/test/CMakeLists.txt
@@ -0,0 +1,6 @@
+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>")