summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Shchelokovskyy <shchelokovskyy@gmail.com>2018-04-19 13:25:31 +0300
committerPavlo Shchelokovskyy <shchelokovskyy@gmail.com>2018-05-03 09:53:57 +0300
commit0e0e408048755548f2f669e8e55f40e97106f0fe (patch)
tree0d64ad2e31867e115b6b072ab7187fc598c42611
parente145c4ef8a0e8390f0468df422a757760e77f823 (diff)
downloadpython-neutronclient-0e0e408048755548f2f669e8e55f40e97106f0fe.tar.gz
Fix Pike gates
this patch is a combined collection of a number of fixes: - use Zuul's CI user instead of hardcoded `jenkins` - comply with new PTI re documentation building - Pin pycodestyle to <=2.3.1 2.4.0 breaks pep8 tests on stable branches, just pin in to known working verison instead of style changes accross project. This package is blacklisted in g-r so that each project can choose to enforce its own code style version. - do not fail if pip has nothing to install inside a pre-built tox env Change-Id: Ib98ea9e423338c3ebc9b697d74574866008d36e6
-rw-r--r--doc/requirements.txt7
-rwxr-xr-xneutronclient/tests/functional/hooks/post_test_hook.sh9
-rw-r--r--setup.cfg6
-rw-r--r--test-requirements.txt4
-rwxr-xr-xtools/tox_install.sh7
-rw-r--r--tox.ini8
6 files changed, 26 insertions, 15 deletions
diff --git a/doc/requirements.txt b/doc/requirements.txt
new file mode 100644
index 0000000..f3d4c20
--- /dev/null
+++ b/doc/requirements.txt
@@ -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.
+
+openstackdocstheme>=1.16.0 # Apache-2.0
+reno!=2.3.1,>=1.8.0 # Apache-2.0
+sphinx>=1.6.2 # BSD
diff --git a/neutronclient/tests/functional/hooks/post_test_hook.sh b/neutronclient/tests/functional/hooks/post_test_hook.sh
index 5fb66a1..43cc9c4 100755
--- a/neutronclient/tests/functional/hooks/post_test_hook.sh
+++ b/neutronclient/tests/functional/hooks/post_test_hook.sh
@@ -31,8 +31,8 @@ function generate_test_logs {
function generate_testr_results {
# Give job user rights to access tox logs
- sudo -H -u $owner chmod o+rw .
- sudo -H -u $owner chmod o+rw -R .testrepository
+ sudo -H -u $USER chmod o+rw .
+ sudo -H -u $USER chmod o+rw -R .testrepository
if [ -f ".testrepository/0" ] ; then
.tox/$VENV/bin/subunit-1to2 < .testrepository/0 > ./testrepository.subunit
$SCRIPTS_DIR/subunit2html ./testrepository.subunit testr_results.html
@@ -48,9 +48,8 @@ function generate_testr_results {
}
export NEUTRONCLIENT_DIR="$BASE/new/python-neutronclient"
-owner=jenkins
-sudo chown -R $owner:stack $NEUTRONCLIENT_DIR
+sudo chown -R $USER:stack $NEUTRONCLIENT_DIR
# Go to the neutronclient dir
cd $NEUTRONCLIENT_DIR
@@ -60,7 +59,7 @@ VENV=${1:-"functional"}
echo "Running neutronclient functional test suite"
set +e
# Preserve env for OS_ credentials
-sudo -E -H -u $owner tox -e $VENV
+sudo -E -H -u $USER tox -e $VENV
EXIT_CODE=$?
set -e
diff --git a/setup.cfg b/setup.cfg
index 60bd860..2f020f3 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -386,12 +386,6 @@ neutron.cli.v2 =
vpn-ikepolicy-delete = neutronclient.neutron.v2_0.vpn.ikepolicy:DeleteIKEPolicy
-[build_sphinx]
-all_files = 1
-build-dir = doc/build
-source-dir = doc/source
-warning-is-error = 1
-
[wheel]
universal = 1
diff --git a/test-requirements.txt b/test-requirements.txt
index f46be71..911f27a 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -8,15 +8,13 @@ fixtures>=3.0.0 # Apache-2.0/BSD
flake8-import-order==0.12 # LGPLv3
mox3!=0.19.0,>=0.7.0 # Apache-2.0
mock>=2.0 # BSD
-openstackdocstheme>=1.16.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
osprofiler>=1.4.0 # Apache-2.0
python-openstackclient>=3.11.0 # Apache-2.0
python-subunit>=0.0.18 # Apache-2.0/BSD
-reno!=2.3.1,>=1.8.0 # Apache-2.0
requests-mock>=1.1 # Apache-2.0
-sphinx>=1.6.2 # BSD
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
testscenarios>=0.4 # Apache-2.0/BSD
tempest>=16.1.0 # Apache-2.0
+pycodestyle<=2.3.1
diff --git a/tools/tox_install.sh b/tools/tox_install.sh
index e3fb459..cdc53f2 100755
--- a/tools/tox_install.sh
+++ b/tools/tox_install.sh
@@ -51,5 +51,10 @@ fi
# install will be constrained and we need to unconstrain it.
edit-constraints $localfile -- $CLIENT_NAME "-e file://$PWD#egg=$CLIENT_NAME"
-$install_cmd -U $*
+if [ -z "$@" ]; then
+ echo "No packages to be installed."
+ exit 0
+fi
+
+$install_cmd -U "$@"
exit $?
diff --git a/tox.ini b/tox.ini
index 78f7a19..67c9f1e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -47,9 +47,17 @@ commands =
coverage report
[testenv:docs]
+# The upper constraints are handled by tox_install.sh script
+deps =
+ -r{toxinidir}/requirements.txt
+ -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
+# The upper constraints are handled by tox_install.sh script
+deps =
+ -r{toxinidir}/requirements.txt
+ -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]