While this isn't required for pytest operation and execution of the
system test suite, it can be handy to allow test script development and
debugging. Especially setup scripts often source conf.sh and expect
environment variables to be loaded. If these scripts are executed
stand-alone, the environment variables need to be loaded from the python
package.
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
+# When sourcing the script outside the pytest environment (e.g. during helper
+# script development), the env variables have to be loaded.
+if [ -z "$TOP_SRCDIR" ]; then
+ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd | sed -E 's|(.*bin/tests/system).*|\1|')
+ eval "$(PYTHONPATH="$SCRIPT_DIR:$PYTHONPATH" /usr/bin/env python3 -m isctest)"
+fi
+
testsock6() {
if test -n "$PERL" && $PERL -e "use IO::Socket::IP;" 2> /dev/null
then
--- /dev/null
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+#
+# SPDX-License-Identifier: MPL-2.0
+#
+# 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 https://mozilla.org/MPL/2.0/.
+#
+# See the COPYRIGHT file distributed with this work for additional
+# information regarding copyright ownership.
+
+from .vars import ALL
+
+
+if __name__ == "__main__":
+ for name, value in ALL.items():
+ print(f"export {name}={value}")