pcs/tests/tests.yml

73 lines
2.0 KiB
YAML
Raw Normal View History

- hosts: localhost
tags:
- classic
vars:
# standard-test-basic directory for tests are relative to {{ tenv_workdir }}
tenv_workdir: /var/test
pre_tasks:
- import_role:
name: standard-test-source
vars:
fetch_only: True
- name: Copy files including source to test environment
synchronize:
src: "{{ playbook_dir }}/.."
dest: "{{ tenv_workdir }}"
mode: push
ssh_args: "-o UserKnownHostsFile=/dev/null"
- name: Start pcsd
systemd:
state: started
name: pcsd
daemon_reload: yes
roles:
# roles documentation:
# https://pagure.io/standard-test-roles/blob/master/f/roles/standard-test-source
- role: standard-test-basic
required_packages:
- autoconf
- automake
- make
- rpm-build
- ruby-devel
2021-02-25 14:56:52 +00:00
- git-core
- booth-site
- fence-agents-apc
- fence-agents-ipmilan
- fence-agents-scsi
- fence-virt
- openssl
- pcs
- pcs-snmp
- python3-pip
- python3-setuptools_scm
- python3-wheel
- rubygem-test-unit
- wget
required_services:
- pcsd
tests:
# dir: . -> dot means tests dir in distgit
- prepare-source:
dir: ./
run: rpmbuild -bp {{tenv_workdir}}/*.spec --nodeps --define "_sourcedir {{tenv_workdir}}" --define "_builddir {{tenv_workdir}}/source"
- flatten-source:
dir: ./
run: shopt -s dotglob; mv {{tenv_workdir}}/source/*/* {{tenv_workdir}}/source
- build_sources:
dir: ./source
run: "export PYTHONPATH=/usr/lib64/pcs/pcs_bundled/packages/; export GEM_HOME=/usr/lib64/pcsd/vendor/bundle/; ./autogen.sh && ./configure"
- remove_sources:
dir: ./source
run: rm -rfv pcs
- run_upstream_tier0_tests:
dir: ./source
run: pcs_test/suite --tier0 -v --vanilla --installed
- run_upstream_tier1_tests:
dir: ./source
run: pcs_test/suite --tier1 -v --vanilla --installed
- run_smoke_tests:
dir: ./source
run: pcs_test/smoke.sh