Donot install testrepository from pip as sudo user for fedora
* p-o-i ci deploys the cloud using rpm and installing packages from pip as sudo user may screw up the environment. * we run tempest from source and testrepository is a tempest requirements. So we can use the same to generate subunit file. * Cleaned up repeated tempest/testr binary by moving to a variable. * Install testrepository on debian only. Change-Id: I0387855dd39776d69c62b175a3eb39b84455b927
This commit is contained in:
parent
1e0980fece
commit
ea3bde5d30
43
run_tests.sh
43
run_tests.sh
@ -248,16 +248,13 @@ fi
|
|||||||
timestamp_puppet_log
|
timestamp_puppet_log
|
||||||
|
|
||||||
print_header 'Prepare Tempest'
|
print_header 'Prepare Tempest'
|
||||||
if [ "${TEMPEST_FROM_SOURCE}" = true ]; then
|
|
||||||
# We need latest testrepository to run stackviz correctly
|
# FIXME: Since tempest create tempest workspace which is owned by root user.
|
||||||
$SUDO pip install -U testrepository
|
# We need to fix it in puppet-tempest, as a workaround we are changing the mode
|
||||||
else
|
# of tempest workspace and run tempest command using root.
|
||||||
# FIXME: Since tempest create tempest workspace which is owned by root user.
|
$SUDO touch /tmp/openstack/tempest/test-whitelist.txt
|
||||||
# We need to fix it in puppet-tempest, as a workaround we are changing the mode
|
$SUDO chown -R "$(id -u):$(id -g)" /tmp/openstack/tempest/test-whitelist.txt
|
||||||
# of tempest workspace and run tempest command using root.
|
|
||||||
$SUDO touch /tmp/openstack/tempest/test-whitelist.txt
|
|
||||||
$SUDO chown -R "$(id -u):$(id -g)" /tmp/openstack/tempest/test-whitelist.txt
|
|
||||||
fi
|
|
||||||
|
|
||||||
# install from source now on ubuntu until packaged
|
# install from source now on ubuntu until packaged
|
||||||
if uses_debs; then
|
if uses_debs; then
|
||||||
@ -323,19 +320,25 @@ if [ "${TEMPEST_FROM_SOURCE}" = true ]; then
|
|||||||
virtualenv --system-site-packages run_tempest
|
virtualenv --system-site-packages run_tempest
|
||||||
run_tempest/bin/pip install -c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt -U -r requirements.txt
|
run_tempest/bin/pip install -c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt -U -r requirements.txt
|
||||||
run_tempest/bin/python setup.py install
|
run_tempest/bin/python setup.py install
|
||||||
run_tempest/bin/tempest run --whitelist_file=/tmp/openstack/tempest/test-whitelist.txt --concurrency=2 $EXCLUDES
|
export tempest_binary="run_tempest/bin/tempest"
|
||||||
RESULT=$?
|
export testr_binary="run_tempest/bin/testr"
|
||||||
set -e
|
|
||||||
testr last --subunit > /tmp/openstack/tempest/testrepository.subunit
|
|
||||||
run_tempest/bin/tempest list-plugins
|
|
||||||
else
|
else
|
||||||
/usr/bin/tempest run --whitelist_file=/tmp/openstack/tempest/test-whitelist.txt --concurrency=2 $EXCLUDES
|
export tempest_binary="/usr/bin/tempest"
|
||||||
RESULT=$?
|
export testr_binary="/usr/bin/testr"
|
||||||
set -e
|
|
||||||
/usr/bin/testr last --subunit > /tmp/openstack/tempest/testrepository.subunit
|
|
||||||
/usr/bin/tempest list-plugins
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Run tempest commands
|
||||||
|
$tempest_binary run --whitelist_file=/tmp/openstack/tempest/test-whitelist.txt --concurrency=2 $EXCLUDES
|
||||||
|
RESULT=$?
|
||||||
|
set -e
|
||||||
|
if uses_debs; then
|
||||||
|
$SUDO pip install -U testrepository
|
||||||
|
testr last --subunit > /tmp/openstack/tempest/testrepository.subunit
|
||||||
|
elif is_fedora; then
|
||||||
|
$testr_binary last --subunit > /tmp/openstack/tempest/testrepository.subunit
|
||||||
|
fi
|
||||||
|
$tempest_binary list-plugins
|
||||||
|
|
||||||
print_header 'SELinux Alerts (Tempest)'
|
print_header 'SELinux Alerts (Tempest)'
|
||||||
catch_selinux_alerts
|
catch_selinux_alerts
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user