Avoid tox-install.sh
Instead of using tox-install.sh, we can install horizon now directly from pypi - or use the current branch in CI system using tox-siblings. Create doc/requirements.txt for doc requirements as well, it's use currently only for releasenotes. Remove obsolete oslosphinx requirement. Remove docs environment - this project has no docs, only releasenotes. Update tox.ini for this change and add horizon to requirements file. Change-Id: I72a942149a88183a32afc0440ead7b927bdc93b5
This commit is contained in:
parent
0c02a5d04b
commit
ca02545ad6
7
doc/requirements.txt
Normal file
7
doc/requirements.txt
Normal file
@ -0,0 +1,7 @@
|
||||
# The order of packages is significant, because pip processes them in the order
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
sphinx!=1.6.6,>=1.6.2 # BSD
|
||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||
reno>=2.5.0 # Apache-2.0
|
@ -15,3 +15,5 @@ python-neutronclient>=6.7.0 # Apache-2.0
|
||||
python-novaclient>=9.1.0 # Apache-2.0
|
||||
python-saharaclient>=1.4.0 # Apache-2.0
|
||||
pytz>=2013.6 # MIT
|
||||
|
||||
horizon>=13.0.0 # Apache-2.0
|
||||
|
@ -6,16 +6,12 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
ddt>=1.0.1 # MIT
|
||||
django-nose>=1.4.4 # BSD
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
mock>=2.0.0 # BSD
|
||||
mox3>=0.20.0 # Apache-2.0
|
||||
netifaces>=0.10.4 # MIT
|
||||
nose-exclude>=0.3.0 # LGPL
|
||||
python-subunit>=1.0.0 # Apache-2.0/BSD
|
||||
selenium>=2.50.1 # Apache-2.0
|
||||
sphinx!=1.6.6,>=1.6.2 # BSD
|
||||
oslosphinx>=4.7.0 # Apache-2.0
|
||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
testtools>=2.2.0 # MIT
|
||||
|
@ -1,64 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Many of neutron's repos suffer from the problem of depending on neutron,
|
||||
# but it not existing on pypi.
|
||||
|
||||
# This wrapper for tox's package installer will use the existing package
|
||||
# if it exists, else use zuul-cloner if that program exists, else grab it
|
||||
# from neutron master via a hard-coded URL. That last case should only
|
||||
# happen with devs running unit tests locally.
|
||||
|
||||
# From the tox.ini config page:
|
||||
# install_command=ARGV
|
||||
# default:
|
||||
# pip install {opts} {packages}
|
||||
|
||||
ZUUL_CLONER=/usr/zuul-env/bin/zuul-cloner
|
||||
GIT_BASE=${GIT_BASE:-https://git.openstack.org/}
|
||||
|
||||
install_project() {
|
||||
local project=$1
|
||||
local branch=${2:-${BRANCH_NAME:-master}}
|
||||
local module_name=${project//-/_}
|
||||
|
||||
set +e
|
||||
project_installed=$(echo "import $module_name" | python 2>/dev/null ; echo $?)
|
||||
set -e
|
||||
|
||||
if [ $project_installed -eq 0 ]; then
|
||||
echo "ALREADY INSTALLED" > /tmp/tox_install.txt
|
||||
echo "$project already installed; using existing package"
|
||||
elif [ -x "$ZUUL_CLONER" ]; then
|
||||
echo "ZUUL CLONER" > /tmp/tox_install.txt
|
||||
# Make this relative to current working directory so that
|
||||
# git clean can remove it. We cannot remove the directory directly
|
||||
# since it is referenced after $install_cmd -e
|
||||
mkdir -p .tmp
|
||||
PROJECT_DIR=$(/bin/mktemp -d -p $(pwd)/.tmp)
|
||||
pushd $PROJECT_DIR
|
||||
$ZUUL_CLONER --cache-dir \
|
||||
/opt/git \
|
||||
--branch $branch \
|
||||
http://git.openstack.org \
|
||||
openstack/$project
|
||||
cd openstack/$project
|
||||
$install_cmd -e .
|
||||
popd
|
||||
else
|
||||
echo "PIP HARDCODE" > /tmp/tox_install.txt
|
||||
local GIT_REPO="$GIT_BASE/openstack/$project"
|
||||
SRC_DIR="$VIRTUAL_ENV/src/$project"
|
||||
git clone --depth 1 --branch $branch $GIT_REPO $SRC_DIR
|
||||
$install_cmd -U -e $SRC_DIR
|
||||
fi
|
||||
}
|
||||
|
||||
set -e
|
||||
|
||||
install_cmd="pip install -c$1"
|
||||
shift
|
||||
|
||||
install_project horizon
|
||||
|
||||
$install_cmd -U $*
|
||||
exit $?
|
16
tox.ini
16
tox.ini
@ -5,24 +5,19 @@ skipsdist = True
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
BRANCH_NAME=master
|
||||
CLIENT_NAME=sahara-dashboard
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
install_command = pip install {opts} {packages}
|
||||
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
whitelist_externals = /bin/bash
|
||||
commands = /bin/bash run_tests.sh -N --no-pep8 {posargs}
|
||||
|
||||
[testenv:py27]
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
DJANGO_SETTINGS_MODULE=sahara_dashboard.test.settings
|
||||
|
||||
[testenv:py35]
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
DJANGO_SETTINGS_MODULE=sahara_dashboard.test.settings
|
||||
|
||||
[testenv:pep8]
|
||||
@ -41,14 +36,13 @@ basepython = python2.7
|
||||
commands = /bin/bash run_tests.sh -N --integration --selenium-headless {posargs}
|
||||
|
||||
[testenv:releasenotes]
|
||||
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||
-r{toxinidir}/doc/requirements.txt
|
||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[testenv:cover]
|
||||
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
[testenv:debug]
|
||||
commands = oslo_debug_helper -t sahara_dashboard/test {posargs}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user