From 8a73ffa2bbefbe5d7a6131a3602279f90c8b6bd5 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Wed, 11 Sep 2019 13:21:26 +0000 Subject: [PATCH] Revert "check-plugins job: convert the job to tox" This reverts commit 1aed3ce715f89de1348e116b63676f8be717d7ed. Change-Id: Id983fddcf07a5a43da62b7529d531c2444404b22 --- .zuul.yaml | 5 ++-- .../openstackclient-check-plugins/run.yaml | 19 +++++++++++++++ tests/check_osc_commands.py | 24 ++++++++----------- tests/install-siblings.sh | 3 --- tox.ini | 15 ------------ 5 files changed, 31 insertions(+), 35 deletions(-) create mode 100644 playbooks/openstackclient-check-plugins/run.yaml delete mode 100644 tests/install-siblings.sh diff --git a/.zuul.yaml b/.zuul.yaml index 9b62ccf..f657714 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,10 +1,9 @@ # from o-z-j/zuul.d/zuul-legacy-jobs.yaml - job: name: openstackclient-check-plugins - parent: openstack-tox + parent: unittests + run: playbooks/openstackclient-check-plugins/run.yaml timeout: 1800 - vars: - tox_envlist: osc_plugins required-projects: - openstack/openstackclient - x/pbrx diff --git a/playbooks/openstackclient-check-plugins/run.yaml b/playbooks/openstackclient-check-plugins/run.yaml new file mode 100644 index 0000000..8e8f3ec --- /dev/null +++ b/playbooks/openstackclient-check-plugins/run.yaml @@ -0,0 +1,19 @@ +- hosts: all + name: Run openstackclient plugin check + tasks: + + - shell: + cmd: | + echo "------------------------------------------------------------" + virtualenv osc_plugins + osc_plugins/bin/pip install -e ../../x/pbrx + echo "------------------------------------------------------------" + osc_plugins/bin/pip install -c ../requirements/upper-constraints.txt -r requirements.txt + echo "------------------------------------------------------------" + osc_plugins/bin/pbrx install-siblings -c ../requirements/upper-constraints.txt $(find ../.. -mindepth 2 -maxdepth 2) + echo "------------------------------------------------------------" + osc_plugins/bin/pbr freeze + echo "------------------------------------------------------------" + osc_plugins/bin/openstack --version + osc_plugins/bin/python tests/check_osc_commands.py + chdir: /home/zuul/src/opendev.org/openstack/openstackclient diff --git a/tests/check_osc_commands.py b/tests/check_osc_commands.py index 2e37dd6..7daf5c8 100755 --- a/tests/check_osc_commands.py +++ b/tests/check_osc_commands.py @@ -18,7 +18,6 @@ plugins with the purpose of detecting duplicate commands. """ import pkg_resources -import pprint import traceback @@ -97,29 +96,26 @@ def find_duplicates(): if duplicate_cmds: print("Duplicate commands found...") - pprint.pprint(duplicate_cmds) + print(duplicate_cmds) return True if failed_cmds: print("Some commands failed to load...") - pprint.pprint(failed_cmds) + print(failed_cmds) return True overlap_cmds = _check_command_overlap(valid_cmds) - - print("Final set of commands...") - pprint.pprint(valid_cmds) - if overlap_cmds: print("WARNING: Some commands overlap...") - pprint.pprint(overlap_cmds) + print(overlap_cmds) # FIXME(stevemar): when we determine why commands are overlapping - # we can uncomment the line below. We return False until then. + # we can uncomment the line below. # return True - return False - else: - # Safely return False here with the full set of commands - print("Found no duplicate or overlapping commands, OK to merge!") - return False + + # Safely return False here with the full set of commands + print("Final set of commands...") + print(valid_cmds) + print("Found no duplicate or overlapping commands, OK to merge!") + return False def _check_command_overlap(valid_cmds): diff --git a/tests/install-siblings.sh b/tests/install-siblings.sh deleted file mode 100644 index 3715d13..0000000 --- a/tests/install-siblings.sh +++ /dev/null @@ -1,3 +0,0 @@ -#/bin/bash - -pbrx install-siblings -c ../requirements/upper-constraints.txt $(find ../.. -mindepth 2 -maxdepth 2) diff --git a/tox.ini b/tox.ini index 73b018e..33c9dbe 100644 --- a/tox.ini +++ b/tox.ini @@ -22,21 +22,6 @@ deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html -[testenv:osc_plugins] -basepython = python2.7 -deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} - -r{toxinidir}/requirements.txt - ../../x/pbrx -whitelist_externals = - bash -commands = - # bash wrapper is required to handle a subshell of find. - bash ./tests/install-siblings.sh - pbr freeze - openstack --version - python tests/check_osc_commands.py - [flake8] ignore = E123,H405 show-source = True