]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
CMake: Test presence of prove for perl tests
authorVitaly Chikunov <vt@altlinux.org>
Tue, 7 Dec 2021 09:33:41 +0000 (12:33 +0300)
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>
Sat, 11 Dec 2021 16:45:14 +0000 (19:45 +0300)
This will skip tests on Windows, due to prove being `.bat' file and cmake will
be unable to run it.

Also, `HAVE_TEST2_V0' is renamed to be more meaningful.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
CMakeLists.txt

index e1c4e1dd450ecc05751288ce23e2986d12ec32b2..0a53cba68293c2096ee0b29d98998d6523d9850f 100644 (file)
@@ -290,8 +290,9 @@ add_test(NAME gost89 COMMAND test_gost89)
 
 if(NOT SKIP_PERL_TESTS)
     execute_process(COMMAND perl -MTest2::V0 -e ""
-       ERROR_QUIET RESULT_VARIABLE HAVE_TEST2_V0)
-    if(NOT HAVE_TEST2_V0)
+       ERROR_QUIET RESULT_VARIABLE MISSING_TEST2_V0)
+    find_program(HAVE_PROVE NAMES prove)
+    if(NOT MISSING_TEST2_V0 AND HAVE_PROVE)
        add_test(NAME engine
            COMMAND prove --merge -PWrapOpenSSL ${CMAKE_CURRENT_SOURCE_DIR}/test :: engine)
        set_tests_properties(engine PROPERTIES ENVIRONMENT "${TEST_ENVIRONMENT_ENGINE}")