# change directory to the workspace before including this
.find_python: &find_python
- - PYTHON="$(sed -n -E 's|^[[:space:]]*"PYTHON":[[:space:]]*"([^"]*)",[[:space:]]*$|\1|p' bin/tests/system/isctest/vars/autoconf.py)"
+ - PYTHON="$(cat bin/tests/system/isctest/vars/.ac_vars/PYTHON)"
- test -x "$PYTHON"
.find_pytest: &find_pytest
- - PYTEST="$(sed -n -E 's|^[[:space:]]*"PYTEST":[[:space:]]*"([^"]*)",[[:space:]]*$|\1|p' bin/tests/system/isctest/vars/autoconf.py)"
+ - PYTEST="$(cat bin/tests/system/isctest/vars/.ac_vars/PYTEST)"
- test -x "$PYTEST"
.parse_tsan: &parse_tsan
bin/tests/system/forward/CA/index.txt
bin/tests/system/forward/CA/index.txt.attr
bin/tests/system/forward/CA/serial
+ bin/tests/system/isctest/vars/.ac_vars/*
bin/tests/system/journal/ns1/managed-keys.bind.in
bin/tests/system/journal/ns1/managed-keys.bind.jnl.in
bin/tests/system/journal/ns2/managed-keys.bind.in
/start.sh
/stop.sh
/ifconfig.sh
-/isctest/vars/autoconf.py
+/isctest/vars/.ac_vars/*
+!/isctest/vars/.ac_vars/*.in
# Ignore file names with underscore in their name except python or shell files.
# This is done to ignore the temporary directories and symlinks created by the
--- /dev/null
+@FSTRM_CAPTURE@
--- /dev/null
+@abs_top_builddir@
--- /dev/null
+@abs_top_srcdir@
--- /dev/null
+@XSLTPROC@
--- /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 pathlib import Path
+from typing import Dict
+
+
+def load_ac_vars_from_files() -> Dict[str, str]:
+ ac_vars = {}
+ ac_vars_dir = Path(__file__).resolve().parent / ".ac_vars"
+ var_paths = [
+ path
+ for path in ac_vars_dir.iterdir()
+ if path.is_file() and not path.name.endswith(".in")
+ ]
+ for var_path in var_paths:
+ ac_vars[var_path.name] = var_path.read_text(encoding="utf-8").strip()
+ return ac_vars
+
+
+AC_VARS = load_ac_vars_from_files()
+++ /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.
-
-AC_VARS = {
- "TOP_BUILDDIR": "@abs_top_builddir@",
- "TOP_SRCDIR": "@abs_top_srcdir@",
- "FSTRM_CAPTURE": "@FSTRM_CAPTURE@",
- "SHELL": "@SHELL@",
- "PYTHON": "@PYTHON@",
- "PERL": "@PERL@",
- "CURL": "@CURL@",
- "NC": "@NC@",
- "XSLTPROC": "@XSLTPROC@",
- "PYTEST": "@PYTEST@",
-}
AC_CONFIG_FILES([bin/tests/Makefile
bin/tests/system/Makefile
- bin/tests/system/isctest/vars/autoconf.py
+ bin/tests/system/isctest/vars/.ac_vars/TOP_BUILDDIR
+ bin/tests/system/isctest/vars/.ac_vars/TOP_SRCDIR
+ bin/tests/system/isctest/vars/.ac_vars/FSTRM_CAPTURE
+ bin/tests/system/isctest/vars/.ac_vars/SHELL
+ bin/tests/system/isctest/vars/.ac_vars/PYTHON
+ bin/tests/system/isctest/vars/.ac_vars/PERL
+ bin/tests/system/isctest/vars/.ac_vars/CURL
+ bin/tests/system/isctest/vars/.ac_vars/NC
+ bin/tests/system/isctest/vars/.ac_vars/XSLTPROC
+ bin/tests/system/isctest/vars/.ac_vars/PYTEST
bin/tests/system/dyndb/driver/Makefile
bin/tests/system/dlzexternal/driver/Makefile
bin/tests/system/hooks/driver/Makefile