mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
ipatests: use python3 if built with python3
Change the default python version for test scripts https://pagure.io/freeipa/issue/7131 Reviewed-By: Felipe Barreto <fbarreto@redhat.com>
This commit is contained in:
parent
a93592a739
commit
d39456a882
@ -1027,10 +1027,21 @@ mv %{buildroot}%{_bindir}/ipa-test-task %{buildroot}%{_bindir}/ipa-test-task-%{p
|
||||
ln -s %{_bindir}/ipa-run-tests-%{python2_version} %{buildroot}%{_bindir}/ipa-run-tests-2
|
||||
ln -s %{_bindir}/ipa-test-config-%{python2_version} %{buildroot}%{_bindir}/ipa-test-config-2
|
||||
ln -s %{_bindir}/ipa-test-task-%{python2_version} %{buildroot}%{_bindir}/ipa-test-task-2
|
||||
# test framework defaults to Python 2
|
||||
%endif # with_ipatests
|
||||
|
||||
# Decide which Python (2 or 3) should be used as default for tests
|
||||
%if 0%{?with_ipatests}
|
||||
%if 0%{?with_python3}
|
||||
# Building with python3 => make it default for tests
|
||||
ln -s %{_bindir}/ipa-run-tests-%{python3_version} %{buildroot}%{_bindir}/ipa-run-tests
|
||||
ln -s %{_bindir}/ipa-test-config-%{python3_version} %{buildroot}%{_bindir}/ipa-test-config
|
||||
ln -s %{_bindir}/ipa-test-task-%{python3_version} %{buildroot}%{_bindir}/ipa-test-task
|
||||
%else
|
||||
# Building python2 only => make it default for tests
|
||||
ln -s %{_bindir}/ipa-run-tests-%{python2_version} %{buildroot}%{_bindir}/ipa-run-tests
|
||||
ln -s %{_bindir}/ipa-test-config-%{python2_version} %{buildroot}%{_bindir}/ipa-test-config
|
||||
ln -s %{_bindir}/ipa-test-task-%{python2_version} %{buildroot}%{_bindir}/ipa-test-task
|
||||
%endif # with_python3
|
||||
%endif # with_ipatests
|
||||
|
||||
# remove files which are useful only for make uninstall
|
||||
|
Loading…
Reference in New Issue
Block a user