Avoid sudo during tests run

Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
This commit is contained in:
Chenxiong Qi
2026-04-15 23:10:46 +08:00
parent 290d699336
commit 5faaedd90f
3 changed files with 6 additions and 6 deletions

View File

@@ -23,7 +23,7 @@ if(WIN32)
) )
else() else()
execute_process( execute_process(
COMMAND bash -c "sudo nohup bin/gmssl tlcp_server -port 4433 -cert tlcp_server_certs.pem -key signkey.pem -pass P@ssw0rd -ex_key enckey.pem -ex_pass P@ssw0rd > tlcp_server.log 2>&1 &" COMMAND bash -c "nohup bin/gmssl tlcp_server -port 4433 -cert tlcp_server_certs.pem -key signkey.pem -pass P@ssw0rd -ex_key enckey.pem -ex_pass P@ssw0rd > tlcp_server.log 2>&1 &"
RESULT_VARIABLE SERVER_RESULT RESULT_VARIABLE SERVER_RESULT
TIMEOUT 5 TIMEOUT 5
) )
@@ -57,6 +57,6 @@ if(${FOUND_INDEX} EQUAL -1)
endif() endif()
execute_process( execute_process(
COMMAND sudo pkill -f "gmssl" COMMAND pkill -f "gmssl"
) )

View File

@@ -16,7 +16,7 @@ if(NOT EXISTS enckey.pem)
endif() endif()
execute_process( execute_process(
COMMAND bash -c "sudo nohup bin/gmssl tls12_server -port 4333 -cert tls_server_certs.pem -key signkey.pem -pass P@ssw0rd > tls12_server.log 2>&1 &" COMMAND bash -c "nohup bin/gmssl tls12_server -port 4333 -cert tls_server_certs.pem -key signkey.pem -pass P@ssw0rd > tls12_server.log 2>&1 &"
RESULT_VARIABLE SERVER_RESULT RESULT_VARIABLE SERVER_RESULT
TIMEOUT 5 TIMEOUT 5
) )
@@ -40,6 +40,6 @@ if(${FOUND_INDEX} EQUAL -1)
endif() endif()
execute_process( execute_process(
COMMAND sudo pkill -f "gmssl" COMMAND pkill -f "gmssl"
) )

View File

@@ -16,7 +16,7 @@ if(NOT EXISTS enckey.pem)
endif() endif()
execute_process( execute_process(
COMMAND bash -c "sudo nohup bin/gmssl tls13_server -port 4443 -cert tls_server_certs.pem -key signkey.pem -pass P@ssw0rd > tls13_server.log 2>&1 &" COMMAND bash -c "nohup bin/gmssl tls13_server -port 4443 -cert tls_server_certs.pem -key signkey.pem -pass P@ssw0rd > tls13_server.log 2>&1 &"
RESULT_VARIABLE SERVER_RESULT RESULT_VARIABLE SERVER_RESULT
TIMEOUT 5 TIMEOUT 5
) )
@@ -40,6 +40,6 @@ if(${FOUND_INDEX} EQUAL -1)
endif() endif()
execute_process( execute_process(
COMMAND sudo pkill -f "gmssl" COMMAND pkill -f "gmssl"
) )