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
This commit is contained in:
Rodolfo Alonso Hernandez 2022-12-10 11:11:35 +01:00
parent b260b7cba2
commit c93c31852b

View File

@ -49,9 +49,14 @@ if [[ -d "$dst_rootwrap_path" ]]; then
fi fi
mkdir -p -m 755 ${dst_rootwrap_path} 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_rootwrap_path}/* ${dst_rootwrap_path}/
cp -p ${src_conf} ${dst_conf} 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} sed -i "s:^exec_dirs=\(.*\)$:exec_dirs=${target_bin_path},${fullstack_path},\1:" ${dst_conf}
if [[ "$OS_SUDO_TESTING" = "1" ]]; then 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/syslog_log_level=ERROR/syslog_log_level=DEBUG/g' ${dst_conf}
sed -i 's/daemon_timeout=600/daemon_timeout=7800/g' ${dst_conf} sed -i 's/daemon_timeout=600/daemon_timeout=7800/g' ${dst_conf}
cp -p ${neutron_path}/neutron/tests/contrib/testing.filters \ cp -p ${neutron_path}/neutron/tests/contrib/testing.filters \
${dst_rootwrap_path}/ ${filters_path}/
fi fi