summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <ralonsoh@redhat.com>2022-12-10 11:11:35 +0100
committerRodolfo Alonso Hernandez <ralonsoh@redhat.com>2023-02-03 22:18:39 +0100
commitc93c31852b060b748106b90b1105132d7f4e7fe7 (patch)
treeaa62e2a96a549523d6f547f6f625d85b6ed2d29e
parentb260b7cba2d03ee426506fc89dd6a58a9d1a8ffa (diff)
downloadneutron-c93c31852b060b748106b90b1105132d7f4e7fe7.tar.gz
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
-rwxr-xr-xtools/deploy_rootwrap.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/deploy_rootwrap.sh b/tools/deploy_rootwrap.sh
index 27609e8ceb..cc2487723f 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