<commit_before>### This file is used by os-brick component jobs

# Testers. Each tester specifies RPMs to install, RPMs to remove and a set of commands that include the invocation of the tester.
pep8:
    rpm_deps: [ python3-pep8, pyflakes, python3-flake8, python3-hacking ]
    remove_rpm: []
    run: >
        sudo ln -sf /usr/bin/python3 /usr/bin/python;
        sudo pip-3 install hacking==1.1.0;
        sudo pip-3 install doc8>=0.6.0;
        git checkout -- test-requirements.txt requirements.txt;
        tox -v -e pep8 2>&1 | tee ../logs/testrun.log;

unittest:
    rpm_deps: []
    remove_rpm: []
    run: |
        tox --sitepackages -v -e py36 2>&1 | tee ../logs/testrun.log;



# Tempest target
tempest:
   rpm_deps: []
   remove_rpm: []
   run: ""
   blacklist: []

# hostvars[inventory_hostname] is a special ansible variable to get all host's facts
# tester.component.tox_target can be one of the following: [unittest, pep8, dsvm-functional, api]

# Common rpm deps needed for all tester types
rpm_deps: [
  git,
  python3-virtualenv,
  python3-py,
  python3-pluggy,
  gcc,
  python3-devel,
  python3-pip,
  python3-pbr,
  python3-ddt,
  python3-os-win,
  python3-oslo-privsep,
  python3-oslo-vmware,
  python3-castellan,
  python3-cryptography,

  python3-retrying,
  python3-oslo-service,

  python3-oslotest,
  python3-testrepository,
  python3-testscenarios,
  python3-testtools,
  python3-os-testr,
  python3-pycodestyle,
  "{{ hostvars[inventory_hostname][tester.component.tox_target]['rpm_deps'] }}"
]

# The rpms that shouldn't be installed on system, when running tests
remove_rpm: [ "{{ hostvars[inventory_hostname][tester.component.tox_target]['remove_rpm'] }}" ]

# Common pre-run steps used by all tester types
virt_run_config:
  run: >
    set -o pipefail;
    rpm -qa | sort > ../logs/installed-rpms.log;
    truncate --size 0 requirements.txt;
    truncate --size 0 test-requirements.txt;
    sudo pip3 install tox;

    {{ hostvars[inventory_hostname][tester.component.tox_target]['run'] }}


# NOTE: This is the main section. It must exist.
test_config:
  virt:
    RedHat-8:
      setup:
        install: "{{ rpm_deps }}"
        remove: "{{ remove_rpm }}"
        enable_repos: [ 'rhelosp-16.2-trunk-brew', 'rhelosp-16.2-unittest' ]
      run: "{{ virt_run_config.run }}"<commit_msg>[16.2][os-brick] Replace > with |<commit_after>### This file is used by os-brick component jobs

# Testers. Each tester specifies RPMs to install, RPMs to remove and a set of commands that include the invocation of the tester.
pep8:
    rpm_deps: [ python3-pep8, pyflakes, python3-flake8, python3-hacking ]
    remove_rpm: []
    run: >
        sudo ln -sf /usr/bin/python3 /usr/bin/python;
        sudo pip-3 install hacking==1.1.0;
        sudo pip-3 install doc8>=0.6.0;
        git checkout -- test-requirements.txt requirements.txt;
        tox -v -e pep8 2>&1 | tee ../logs/testrun.log;

unittest:
    rpm_deps: []
    remove_rpm: []
    run: |
        tox --sitepackages -v -e py36 2>&1 | tee ../logs/testrun.log;



# Tempest target
tempest:
   rpm_deps: []
   remove_rpm: []
   run: ""
   blacklist: []

# hostvars[inventory_hostname] is a special ansible variable to get all host's facts
# tester.component.tox_target can be one of the following: [unittest, pep8, dsvm-functional, api]

# Common rpm deps needed for all tester types
rpm_deps: [
  git,
  python3-virtualenv,
  python3-py,
  python3-pluggy,
  gcc,
  python3-devel,
  python3-pip,
  python3-pbr,
  python3-ddt,
  python3-os-win,
  python3-oslo-privsep,
  python3-oslo-vmware,
  python3-castellan,
  python3-cryptography,

  python3-retrying,
  python3-oslo-service,

  python3-oslotest,
  python3-testrepository,
  python3-testscenarios,
  python3-testtools,
  python3-os-testr,
  python3-pycodestyle,
  "{{ hostvars[inventory_hostname][tester.component.tox_target]['rpm_deps'] }}"
]

# The rpms that shouldn't be installed on system, when running tests
remove_rpm: [ "{{ hostvars[inventory_hostname][tester.component.tox_target]['remove_rpm'] }}" ]

# Common pre-run steps used by all tester types
virt_run_config:
  run: |
    set -o pipefail
    rpm -qa | sort > ../logs/installed-rpms.log
    truncate --size 0 requirements.txt
    truncate --size 0 test-requirements.txt
    sudo pip3 install tox

    {{ hostvars[inventory_hostname][tester.component.tox_target]['run'] }}


# NOTE: This is the main section. It must exist.
test_config:
  virt:
    RedHat-8:
      setup:
        install: "{{ rpm_deps }}"
        remove: "{{ remove_rpm }}"
        enable_repos: [ 'rhelosp-16.2-trunk-brew', 'rhelosp-16.2-unittest' ]
      run: "{{ virt_run_config.run }}"
{'fraction_non_alphanumeric': 0.12481203007518797, 'fraction_numerical': 0.023845327604726102, 'mean_word_length': 3.160857908847185, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2554626', 'n_tokens_mistral': 1785, 'n_tokens_neox': 1673, 'n_words': 405}