From: Francis Dupont Date: Fri, 28 Jun 2019 11:28:38 +0000 (+0200) Subject: [705-wipe_data-sh-and-other-upgrade_-scripts-do-not-set-prefix] Protected dhcp_test_l... X-Git-Tag: Kea-1.6.0-beta2~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b33ae7dd208c048d5e583a151097c6c00965940;p=thirdparty%2Fkea.git [705-wipe_data-sh-and-other-upgrade_-scripts-do-not-set-prefix] Protected dhcp_test_lib.sh against unset ${prefix} and fixed includers --- diff --git a/src/bin/admin/tests/cql_tests.sh.in b/src/bin/admin/tests/cql_tests.sh.in index 7fa681028a..9af1c502cc 100644 --- a/src/bin/admin/tests/cql_tests.sh.in +++ b/src/bin/admin/tests/cql_tests.sh.in @@ -6,6 +6,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +prefix=@prefix@ # Include common test library. . @abs_top_builddir@/src/lib/testutils/dhcp_test_lib.sh diff --git a/src/bin/admin/tests/memfile_tests.sh.in b/src/bin/admin/tests/memfile_tests.sh.in index 682a411e0c..edc40402dc 100644 --- a/src/bin/admin/tests/memfile_tests.sh.in +++ b/src/bin/admin/tests/memfile_tests.sh.in @@ -1,11 +1,12 @@ #!/bin/sh -# Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +prefix=@prefix@ # Include common test library. . @abs_top_builddir@/src/lib/testutils/dhcp_test_lib.sh diff --git a/src/bin/admin/tests/mysql_tests.sh.in b/src/bin/admin/tests/mysql_tests.sh.in index ecde4117e9..c39571c577 100644 --- a/src/bin/admin/tests/mysql_tests.sh.in +++ b/src/bin/admin/tests/mysql_tests.sh.in @@ -6,6 +6,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +prefix=@prefix@ # Include common test library. . @abs_top_builddir@/src/lib/testutils/dhcp_test_lib.sh diff --git a/src/bin/admin/tests/pgsql_tests.sh.in b/src/bin/admin/tests/pgsql_tests.sh.in index 2cd660cd34..61ae078410 100644 --- a/src/bin/admin/tests/pgsql_tests.sh.in +++ b/src/bin/admin/tests/pgsql_tests.sh.in @@ -1,11 +1,12 @@ #!/bin/sh -# Copyright (C) 2015-2018 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +prefix=@prefix@ # Include common test library. . @abs_top_builddir@/src/lib/testutils/dhcp_test_lib.sh diff --git a/src/bin/agent/tests/ca_process_tests.sh.in b/src/bin/agent/tests/ca_process_tests.sh.in index 498e600fa8..38d220e98f 100644 --- a/src/bin/agent/tests/ca_process_tests.sh.in +++ b/src/bin/agent/tests/ca_process_tests.sh.in @@ -1,9 +1,10 @@ -# Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2016-2019 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +prefix=@prefix@ # Path to the temporary configuration file. CFG_FILE=@abs_top_builddir@/src/bin/agent/tests/test_config.json # Path to the Control Agent log file. diff --git a/src/bin/d2/tests/d2_process_tests.sh.in b/src/bin/d2/tests/d2_process_tests.sh.in index 6927dac2b8..7afd860b37 100644 --- a/src/bin/d2/tests/d2_process_tests.sh.in +++ b/src/bin/d2/tests/d2_process_tests.sh.in @@ -1,9 +1,10 @@ -# Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +prefix=@prefix@ # Path to the temporary configuration file. CFG_FILE=@abs_top_builddir@/src/bin/d2/tests/test_config.json # Path to the D2 log file. diff --git a/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in b/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in index 96cba300bc..57223b3ec1 100644 --- a/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in +++ b/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in @@ -1,9 +1,10 @@ -# Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +prefix=@prefix@ # Path to the temporary configuration file. CFG_FILE=@abs_top_builddir@/src/bin/dhcp4/tests/test_config.json # Path to the Kea log file. diff --git a/src/bin/dhcp6/tests/dhcp6_process_tests.sh.in b/src/bin/dhcp6/tests/dhcp6_process_tests.sh.in index ab7d419cc4..ca11496fce 100644 --- a/src/bin/dhcp6/tests/dhcp6_process_tests.sh.in +++ b/src/bin/dhcp6/tests/dhcp6_process_tests.sh.in @@ -1,9 +1,12 @@ -# Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC") +#!/bin/sh + +# Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +prefix=@prefix@ # Path to the temporary configuration file. CFG_FILE=@abs_top_builddir@/src/bin/dhcp6/tests/test_config.json # Path to the Kea log file. diff --git a/src/bin/keactrl/tests/keactrl_tests.sh.in b/src/bin/keactrl/tests/keactrl_tests.sh.in index 860054b26d..2c4a31bef4 100644 --- a/src/bin/keactrl/tests/keactrl_tests.sh.in +++ b/src/bin/keactrl/tests/keactrl_tests.sh.in @@ -6,6 +6,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +prefix=@prefix@ # Include common test library. . @abs_top_builddir@/src/lib/testutils/dhcp_test_lib.sh diff --git a/src/bin/netconf/tests/shtests/netconf_tests.sh.in b/src/bin/netconf/tests/shtests/netconf_tests.sh.in index 306d4e08ef..ba311b69d4 100644 --- a/src/bin/netconf/tests/shtests/netconf_tests.sh.in +++ b/src/bin/netconf/tests/shtests/netconf_tests.sh.in @@ -1,9 +1,12 @@ -# Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC") +#!/bin/sh + +# Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +prefix=@prefix@ # Path to the temporary configuration file. CFG_FILE=@abs_top_builddir@/src/bin/netconf/tests/shtests/test_config.json # Path to the Kea log file. diff --git a/src/bin/shell/tests/shell_process_tests.sh.in b/src/bin/shell/tests/shell_process_tests.sh.in index 3a9545c489..f1345e3403 100644 --- a/src/bin/shell/tests/shell_process_tests.sh.in +++ b/src/bin/shell/tests/shell_process_tests.sh.in @@ -4,6 +4,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +prefix=@prefix@ # Path to the temporary configuration file. CFG_FILE=@abs_top_builddir@/src/bin/shell/tests/test_config.json # Path to the Control Agent log file. diff --git a/src/lib/testutils/dhcp_test_lib.sh.in b/src/lib/testutils/dhcp_test_lib.sh.in index 462522ca7e..3a8afb390d 100644 --- a/src/lib/testutils/dhcp_test_lib.sh.in +++ b/src/lib/testutils/dhcp_test_lib.sh.in @@ -803,3 +803,9 @@ server_pid_file_test() { # All ok. Shut down the server and exit. test_finish 0 } + +# Verify that prefix was set by the includer. +if [ -z ${prefix+x} ]; then + printf "internal error: \${prefix} must be set\n" + clean_exit 1 +fi