diff --git a/.gitignore b/.gitignore index 42bca0b41..402a1f803 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ Pipfile.lock tobiko.conf clouds.yaml ssh_config +.infrared diff --git a/Vagrantfile b/Vagrantfile index c30771409..9529d880b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -106,7 +106,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| end config.vm.synced_folder ".", "/vagrant", type: "rsync", - rsync__exclude: [".tox/", "tobiko.conf", ".tobiko"] + rsync__exclude: [".tox/", "tobiko.conf", ".tobiko", ".infrared"] # OS faults doesn't support other ports for SSH connection used by ansible config.vm.network "forwarded_port", guest: 22, host: 22 diff --git a/bindep.txt b/bindep.txt index a9ea186fc..028c6721d 100644 --- a/bindep.txt +++ b/bindep.txt @@ -20,6 +20,8 @@ python3-dev [platform:ubuntu] # RHEL/CentOS 7 libselinux-python [platform:rhel-7] libselinux-python [platform:centos-7] +python2-devel [platform:rhel-7] +python2-devel [platform:centos-7] # RHEL/CentOS 8 python3-libselinux [platform:rhel-8] diff --git a/infrared/plugin.spec b/infrared/plugin.spec deleted file mode 100644 index d6bd3e319..000000000 --- a/infrared/plugin.spec +++ /dev/null @@ -1,72 +0,0 @@ - ---- - -config: - plugin_type: test - entry_point: ../roles/tobiko/main.yml - -subparsers: - tobiko: - description: Configure and Run Tobiko Test Cases - - include_groups: - - "Ansible options" - - "Inventory" - - "Common options" - - "Answers file" - - groups: - - title: Stages Control - options: - - pre_run: - type: Bool - help: install and configure Tobiko test cases - - run_tests: - type: Bool - help: run verification test cases - - run_faults: - type: Bool - help: run disruptive operation test cases - - post_run: - type: Bool - help: fetch artifacts after test case execution - - - title: Install Options - options: - tox_dir: - type: Value - default: "{{ ansible_env.HOME }}/tobiko" - help: | - The directory where Tobiko will be installed and used - overcloudrc: - type: Value - default: "{{ ansible_env.HOME }}/overcloudrc" - help: | - The path to the overcloudrc file - floating_network: - type: Value - default: "public" - help: | - Name of overcloud's floating_network - tests: - type: Value - help: | - The set of tests to execute - default: scenario - results_dir_suffix: - type: Value - help: | - Suffix string to add to tobiko_results dir - example : default will be tobiko_results_1st - default: "1st" - refsec: - type: Value - help: | - specific gerrit patch refsec to - checkout, example: - --refsec refs/changes/66/665966/7 - default: '' diff --git a/plugin.spec b/roles/infrared/plugin.spec similarity index 97% rename from plugin.spec rename to roles/infrared/plugin.spec index 85cfc8d9e..6b317c9b6 100644 --- a/plugin.spec +++ b/roles/infrared/plugin.spec @@ -1,7 +1,7 @@ --- config: plugin_type: test - entry_point: ./roles/infrared/main.yml + entry_point: main.yml subparsers: tobiko: diff --git a/tools/ci/ir b/tools/ci/ir index 2ff6d67c7..22120370a 100755 --- a/tools/ci/ir +++ b/tools/ci/ir @@ -10,8 +10,8 @@ IR_REPO="https://github.com/redhat-openstack/infrared.git" IR_BRANCH=${IR_BRANCH:-master} IR_SOURCE_DIR=$(realpath "${IR_SOURCE_DIR:-${IR_VIRTUAL_ENV}/infrared}") IR_EXECUTABLE=${IR_VIRTUAL_ENV}/bin/infrared -export IR_HOME=$(realpath ${IR_HOME:-../.infrared/}) -IR_TOBIKO_PLUGIN=$(realpath ${IR_TOBIKO_PLUGIN:-$(pwd)}) +export IR_HOME=$(realpath ${IR_HOME:-$(pwd)/.infrared/}) +IR_TOBIKO_PLUGIN=$(realpath ${IR_TOBIKO_PLUGIN:-$(pwd)/roles/infrared}) function ir { diff --git a/tools/ci/tox b/tools/ci/tox index bb6733417..044d8e1c6 100755 --- a/tools/ci/tox +++ b/tools/ci/tox @@ -36,7 +36,7 @@ function tox_setup { # Cleanup and create virtualenv directory rm -fR "${TOX_VIRTUAL_ENV}" mkdir -p $(dirname "${TOX_VIRTUAL_ENV}") - "${TOX_BASE_PYTHON}" -m virtualenv "${TOX_VIRTUAL_ENV}" + "${TOX_BASE_PYTHON}" -m virtualenv --seeder pip "${TOX_VIRTUAL_ENV}" # Activate virtualenv if tox_activate; then @@ -52,7 +52,7 @@ function tox_setup { function tox_install_deps { tox_install_pip if ! "${TOX_BASE_PYTHON}" -m virtualenv --version; then - "${TOX_BASE_PYTHON}" -m pip install --user virtualenv + "${TOX_BASE_PYTHON}" -m pip install --user --upgrade virtualenv fi } diff --git a/tox.ini b/tox.ini index 05e9a5fa7..f63e6c664 100644 --- a/tox.ini +++ b/tox.ini @@ -178,15 +178,17 @@ commands = {posargs:bash} [testenv:infrared] -basepython = {[testenv:venv]basepython} +# basepython = {[testenv:venv]basepython} +# Package libselinux-python3 still not available on centos-7 +basepython = python deps = {[testenv:venv]deps} passenv = {[testenv:venv]passenv} IR_* setenv = {[testenv:venv]setenv} - IR_HOME={env:IR_HOME:{toxinidir}/../.infrared} - IR_TOBIKO_PLUGIN={env:IR_TOBIKO_PLUGIN:{toxinidir}} + IR_HOME={env:IR_HOME:{toxinidir}/.infrared} + IR_TOBIKO_PLUGIN={env:IR_TOBIKO_PLUGIN:{toxinidir}/roles/infrared} whitelist_externals = * commands = bash {toxinidir}/tools/ci/ir {posargs:tobiko}