From c93c31852b060b748106b90b1105132d7f4e7fe7 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Sat, 10 Dec 2022 11:11:35 +0100 Subject: [PATCH] Adapt deploy_rootwrap filters path for tox4 This patch also fixes the issue of the deploy_rootwrap.sh script related to the rootwrap filters path. This path checks if the path is absolute (tox3) or relative (tox4) and makes it absolute in the second case. [1]https://github.com/tox-dev/tox/issues/2730 Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/866943 Closes-Bug: #1999558 Change-Id: I7a4a30268cb352f25bad7983b94690c0b681e5fa --- tools/deploy_rootwrap.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/deploy_rootwrap.sh b/tools/deploy_rootwrap.sh index 27609e8cebe..cc2487723f1 100755 --- a/tools/deploy_rootwrap.sh +++ b/tools/deploy_rootwrap.sh @@ -49,9 +49,14 @@ if [[ -d "$dst_rootwrap_path" ]]; then fi mkdir -p -m 755 ${dst_rootwrap_path} +filters_path=${dst_rootwrap_path} +if [[ "$filters_path" != /* ]]; then + filters_path=${absolute_neutron_path}/${filters_path} +fi + cp -p ${src_rootwrap_path}/* ${dst_rootwrap_path}/ cp -p ${src_conf} ${dst_conf} -sed -i "s:^filters_path=.*$:filters_path=${absolute_neutron_path}/${dst_rootwrap_path}:" ${dst_conf} +sed -i "s:^filters_path=.*$:filters_path=${filters_path}:" ${dst_conf} sed -i "s:^exec_dirs=\(.*\)$:exec_dirs=${target_bin_path},${fullstack_path},\1:" ${dst_conf} if [[ "$OS_SUDO_TESTING" = "1" ]]; then @@ -59,5 +64,5 @@ if [[ "$OS_SUDO_TESTING" = "1" ]]; then sed -i 's/syslog_log_level=ERROR/syslog_log_level=DEBUG/g' ${dst_conf} sed -i 's/daemon_timeout=600/daemon_timeout=7800/g' ${dst_conf} cp -p ${neutron_path}/neutron/tests/contrib/testing.filters \ - ${dst_rootwrap_path}/ + ${filters_path}/ fi