mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-06 16:36:16 +08:00
Add command test to CMakeLists.txt
This commit is contained in:
@@ -657,6 +657,10 @@ if (CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||
endif()
|
||||
|
||||
|
||||
add_test(NAME gmssl_sm3
|
||||
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_SOURCE_DIR}/cmake/gmssl_sm3.cmake")
|
||||
|
||||
|
||||
# Generate install package with cpack
|
||||
# cpack -G TGZ
|
||||
# cpack -G STGZ
|
||||
|
||||
14
cmake/gmssl_sm3.cmake
Normal file
14
cmake/gmssl_sm3.cmake
Normal file
@@ -0,0 +1,14 @@
|
||||
execute_process(
|
||||
COMMAND gmssl sm3 -in_str abc
|
||||
RESULT_VARIABLE TEST_RESULT
|
||||
ERROR_VARIABLE TEST_STDERR
|
||||
OUTPUT_VARIABLE TEST_OUTPUT
|
||||
)
|
||||
|
||||
if(NOT ${TEST_RESULT} EQUAL 0)
|
||||
message(FATAL_ERROR "stderr: ${TEST_STDERR}")
|
||||
endif()
|
||||
|
||||
if(NOT ${TEST_OUTPUT} STREQUAL "66c7f0f462eeedd9d1f2d46bdc10e4e24167c4875cf2f7a2297da02b8f4ba8e0\n")
|
||||
message(FATAL_ERROR "stdout: ${TEST_OUTPUT}")
|
||||
endif()
|
||||
1
src/sm2_z256_arm64.S
Normal file
1
src/sm2_z256_arm64.S
Normal file
@@ -0,0 +1 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
Reference in New Issue
Block a user