c2b0910fe1
Rocky is now EOL since [1][2] so this removes all the rocky related tests or conditionals. Related reviews in topic branch tripleo-ci-reduce-rocky [3]. [1] https://review.opendev.org/c/openstack/releases/+/774244 [2] http://lists.openstack.org/pipermail/openstack-discuss/2021-March/020912.html [3] https://review.opendev.org/q/topic:tripleo-ci-reduce-rocky Change-Id: Icb999fa6c8278bd54c200c73963b5e364c94c23d
110 lines
3.8 KiB
Django/Jinja
110 lines
3.8 KiB
Django/Jinja
## Run tempest
|
|
## -----------
|
|
|
|
## ::
|
|
|
|
{% if tempest_format == "venv" %}
|
|
export TEMPESTCLI='{{ working_dir }}/tempest_git/tools/with_venv.sh tempest'
|
|
export OSTESTR='{{ working_dir }}/tempest_git/tools/with_venv.sh ostestr'
|
|
{% else %}
|
|
export OSTESTR='ostestr'
|
|
export TEMPESTCLI='/usr/bin/tempest'
|
|
{% endif %}
|
|
export TEMPESTDATA={{ tempest_data }}
|
|
|
|
## List tempest plugins
|
|
|
|
## ::
|
|
|
|
$TEMPESTCLI list-plugins
|
|
|
|
## Save the resources before running tempest tests
|
|
## It will create saved_state.json in tempest workspace.
|
|
## ::
|
|
|
|
{% if tempest_track_resources|bool %}
|
|
$TEMPESTCLI cleanup --init-saved-state
|
|
{% endif %}
|
|
|
|
{% if release in ["newton", "ocata", "pike"] %} $OSTESTR {% else %} $TEMPESTCLI run {% endif %}{% if test_white_regex != '' %} --regex '({{ test_white_regex }})' {% endif %}
|
|
{% if tempest_whitelist|length > 0 %} --whitelist_file=$TEMPESTDATA/{{ tempest_whitelist_file }} {% endif %}
|
|
{% if release not in ["newton", "ocata", "pike"] %} {% if test_black_regex|length > 0 %} --black-regex='{{ test_black_regex|join('|') }}'{% endif %} {% endif %}
|
|
{% if skip_file_src != '' %} --blacklist_file=$TEMPESTDATA/{{ skip_file }} {% endif %}
|
|
{% if tempest_workers is defined %} --concurrency {{ tempest_workers }} {% endif %}
|
|
{% if tempest_until_failure|bool %} --until-failure {% endif %}
|
|
|
|
## Check which all tenants would be modified in the tempest run
|
|
## It will create dry_run.json in tempest workspace.
|
|
## ::
|
|
|
|
{% if tempest_track_resources|bool %}
|
|
$TEMPESTCLI cleanup --dry-run
|
|
{% endif %}
|
|
|
|
{% if tempest_format == "container" %}
|
|
EOF
|
|
chmod +x {{ working_dir }}/tempest_container.sh
|
|
# Copy all the required files in a temprory directory
|
|
export TEMPEST_HOST_DATA='/var/lib/tempestdata'
|
|
|
|
if [ ! -d $TEMPEST_HOST_DATA ]
|
|
then
|
|
sudo mkdir -p $TEMPEST_HOST_DATA
|
|
fi
|
|
|
|
sudo cp \
|
|
{% if tempest_os_cloud == '' %}
|
|
{{ rc_file }} \
|
|
{% endif %}
|
|
{% if skip_file_src != '' %}
|
|
{{ working_dir }}/{{ skip_file }} \
|
|
{% endif %}
|
|
{% if tempest_whitelist|length > 0 %}
|
|
{{ working_dir }}/{{ tempest_whitelist_file }} \
|
|
{% endif %}
|
|
{% if tempest_overcloud|bool %}
|
|
{{ working_dir }}/{{ tempest_deployer_input_file }} \
|
|
{% endif %}
|
|
{{ working_dir }}/tempest_container.sh \
|
|
$TEMPEST_HOST_DATA
|
|
|
|
{% if tempest_os_cloud != '' %}
|
|
sudo cp -Rf {{ working_dir }}/.config $TEMPEST_HOST_DATA
|
|
{% endif %}
|
|
|
|
{% if release not in ['newton', 'ocata', 'pike', 'queens'] %}
|
|
export CONTAINER_BINARY='podman'
|
|
{% else %}
|
|
export CONTAINER_BINARY='docker'
|
|
{% endif %}
|
|
|
|
sudo $CONTAINER_BINARY pull {{ tempest_container_registry }}/{{ tempest_container_namespace }}:{{ tempest_container_tag }}
|
|
|
|
{% if tempest_use_headless_chrome|bool %}
|
|
sudo $CONTAINER_BINARY pull selenium/standalone-chrome
|
|
sudo $CONTAINER_BINARY run -d \
|
|
-p {{ tempest_headless_chrome_port }}:{{ tempest_headless_chrome_port }} \
|
|
-v /dev/shm:/dev/shm selenium/standalone-chrome
|
|
{% endif %}
|
|
# Run tempest container using docker mouting required files
|
|
sudo $CONTAINER_BINARY run --net=host -i -v $TEMPEST_HOST_DATA:{{ tempest_data }} \
|
|
-e PYTHONWARNINGS="${PYTHONWARNINGS:-}" \
|
|
-e CURL_CA_BUNDLE="" \
|
|
--user=root \
|
|
{% if (enable_tls_everywhere is defined and enable_tls_everywhere|bool) %}
|
|
-e KRB5_CLIENT_KTNAME="${KRB5_CLIENT_KTNAME:-}" \
|
|
-v /etc/novajoin/krb5.keytab:/etc/novajoin/krb5.keytab:ro \
|
|
-v /home/{{ undercloud_user }}/krb5.keytab:/home/{{ undercloud_user }}/krb5.keytab:ro \
|
|
-v /etc/ipa/default.conf:/etc/ipa/default.conf:ro \
|
|
-v /etc/ipa/ca.crt:/etc/ipa/ca.crt:ro \
|
|
{% endif %}
|
|
-v /var/log/containers/tempest:{{ tempest_log_dir }} \
|
|
{% if not 'http' in tempest_test_image_path %}
|
|
-v {{ tempest_test_image_path }}:{{ tempest_test_image_path }} \
|
|
{% endif %}
|
|
{{ tempest_container_registry }}/{{ tempest_container_namespace }}:{{ tempest_container_tag }} \
|
|
/usr/bin/bash -c 'set -e; {{ tempest_data }}/tempest_container.sh'
|
|
|
|
{% endif %}
|
|
### --stop_docs
|