Fix Tox Infrared job
Change-Id: Ie4ad2f23e1e518c688dc4334acaa3379827ac146
This commit is contained in:
parent
8902748c22
commit
2e3af9b534
1
.gitignore
vendored
1
.gitignore
vendored
@ -40,3 +40,4 @@ Pipfile.lock
|
||||
tobiko.conf
|
||||
clouds.yaml
|
||||
ssh_config
|
||||
.infrared
|
||||
|
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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: ''
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
config:
|
||||
plugin_type: test
|
||||
entry_point: ./roles/infrared/main.yml
|
||||
entry_point: main.yml
|
||||
|
||||
subparsers:
|
||||
tobiko:
|
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
8
tox.ini
8
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}
|
||||
|
Loading…
Reference in New Issue
Block a user