From: Andrei Pavel Date: Mon, 29 Mar 2021 14:55:33 +0000 (+0300) Subject: [#1775] move TLS test to shell library X-Git-Tag: Kea-1.9.6~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1f8ca4454012e8ec9cc28bb0466ec9e59280e8e;p=thirdparty%2Fkea.git [#1775] move TLS test to shell library --- diff --git a/configure.ac b/configure.ac index 4bc092f46c..ac7b0743b6 100755 --- a/configure.ac +++ b/configure.ac @@ -1412,7 +1412,7 @@ fi # Decide if the control agent TLS test can work. ca_tls_test=no if test "x$enable_shell" != "xno"; then - major=` echo $PYTHON_VERSION | cut -d '.' -f 1` + major=$(echo $PYTHON_VERSION | cut -d '.' -f 1) if test "x$major" = "x3"; then ca_tls_test="$tls_support" else @@ -1637,8 +1637,6 @@ AC_CONFIG_FILES([src/bin/agent/tests/ca_process_tests.sh], AC_CONFIG_FILES([src/bin/agent/tests/test_basic_auth_libraries.h]) AC_CONFIG_FILES([src/bin/agent/tests/test_callout_libraries.h]) AC_CONFIG_FILES([src/bin/agent/tests/test_data_files_config.h]) -AC_CONFIG_FILES([src/bin/agent/tests/tls_ca_process_tests.sh], - [chmod +x src/bin/agent/tests/tls_ca_process_tests.sh]) AC_CONFIG_FILES([src/bin/d2/Makefile]) AC_CONFIG_FILES([src/bin/d2/tests/Makefile]) AC_CONFIG_FILES([src/bin/d2/tests/d2_process_tests.sh], @@ -1687,6 +1685,8 @@ AC_CONFIG_FILES([src/bin/shell/tests/shell_process_tests.sh], [chmod +x src/bin/shell/tests/shell_process_tests.sh]) AC_CONFIG_FILES([src/bin/shell/tests/shell_unittest.py], [chmod +x src/bin/shell/tests/shell_unittest.py]) +AC_CONFIG_FILES([src/bin/shell/tests/tls_ca_process_tests.sh], + [chmod +x src/bin/shell/tests/tls_ca_process_tests.sh]) AC_CONFIG_FILES([src/hooks/Makefile]) AC_CONFIG_FILES([src/hooks/dhcp/Makefile]) AC_CONFIG_FILES([src/hooks/dhcp/bootp/Makefile]) diff --git a/src/bin/agent/tests/.gitignore b/src/bin/agent/tests/.gitignore index 6ed6cdec7c..63fdc3d2f0 100644 --- a/src/bin/agent/tests/.gitignore +++ b/src/bin/agent/tests/.gitignore @@ -3,4 +3,3 @@ /test_basic_auth_libraries.h /test_callout_libraries.h /test_data_files_config.h -/tls_ca_process_tests.sh diff --git a/src/bin/agent/tests/Makefile.am b/src/bin/agent/tests/Makefile.am index 5c6cb36245..722095eaa7 100644 --- a/src/bin/agent/tests/Makefile.am +++ b/src/bin/agent/tests/Makefile.am @@ -2,13 +2,10 @@ SHTESTS = # The test of dynamic reconfiguration based on signals will work only # if we are using file based configuration approach. SHTESTS += ca_process_tests.sh -if CA_TLS_TEST -SHTESTS += tls_ca_process_tests.sh -endif -noinst_SCRIPTS = ca_process_tests.sh tls_ca_process_tests.sh +noinst_SCRIPTS = ca_process_tests.sh -EXTRA_DIST = ca_process_tests.sh.in tls_ca_process_tests.sh.in +EXTRA_DIST = ca_process_tests.sh.in EXTRA_DIST += testdata/get_config.json # test using command-line arguments, so use check-local target instead of TESTS diff --git a/src/bin/shell/tests/.gitignore b/src/bin/shell/tests/.gitignore index e2028da576..f376965840 100644 --- a/src/bin/shell/tests/.gitignore +++ b/src/bin/shell/tests/.gitignore @@ -1,3 +1,4 @@ /basic_auth_tests.sh /shell_process_tests.sh /shell_unittest.py +/tls_ca_process_tests.sh diff --git a/src/bin/shell/tests/Makefile.am b/src/bin/shell/tests/Makefile.am index 1186885782..be4c6038a7 100644 --- a/src/bin/shell/tests/Makefile.am +++ b/src/bin/shell/tests/Makefile.am @@ -1,8 +1,15 @@ PYTESTS = shell_unittest.py -SHTESTS = shell_process_tests.sh basic_auth_tests.sh + +SHTESTS = +SHTESTS += basic_auth_tests.sh +SHTESTS += shell_process_tests.sh +if CA_TLS_TEST +SHTESTS += tls_ca_process_tests.sh +endif + noinst_SCRIPTS = $(PYTESTS) $(SHTESTS) -DISTCLEANFILES = basic_auth_tests.sh shell_process_tests.sh shell_unittest.py +DISTCLEANFILES = $(PYTESTS) $(SHTESTS) # test using command-line arguments, so use check-local target instead of TESTS check-local: check-shell check-python diff --git a/src/bin/agent/tests/tls_ca_process_tests.sh.in b/src/bin/shell/tests/tls_ca_process_tests.sh.in similarity index 100% rename from src/bin/agent/tests/tls_ca_process_tests.sh.in rename to src/bin/shell/tests/tls_ca_process_tests.sh.in