Replace unused gating tests by an initial one
rpm-ostree is tested in upstream and downstream CI. This replaces existing but not-enabled tests by an initial basic functionnal test. Resolves: rhbz#2059665
This commit is contained in:
parent
98780f5290
commit
46412ee5ad
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-9
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} # this is the testcase identifier, which OSCI pipeline uses
|
@ -1,83 +1,9 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
gather_facts: yes
|
roles:
|
||||||
vars:
|
- role: standard-test-basic
|
||||||
artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
|
|
||||||
subjects: "{{ lookup('env', 'TEST_SUBJECTS')}}"
|
|
||||||
tags:
|
tags:
|
||||||
- atomic
|
- classic
|
||||||
|
tests:
|
||||||
tasks:
|
- simple:
|
||||||
- name: Prepare an SSH config
|
dir: .
|
||||||
set_fact:
|
run: "rpm-ostree --help"
|
||||||
ssh_config: |
|
|
||||||
Host vmcheck
|
|
||||||
User {{ansible_ssh_user}}
|
|
||||||
Port {{ansible_ssh_port}}
|
|
||||||
HostName {{ansible_ssh_host}}
|
|
||||||
IdentityFile {{ansible_ssh_private_key_file}}
|
|
||||||
UserKnownHostsFile /dev/null
|
|
||||||
StrictHostKeyChecking no
|
|
||||||
|
|
||||||
- name: Add executor host
|
|
||||||
add_host:
|
|
||||||
name: executor
|
|
||||||
ansible_connection: local
|
|
||||||
ansible_ssh_host: 127.0.0.1
|
|
||||||
ansible_ssh_connection: local
|
|
||||||
|
|
||||||
# XXX: move to standard-test-roles, e.g. standard-test-get-source
|
|
||||||
- name: Extract and run tests
|
|
||||||
delegate_to: executor
|
|
||||||
block:
|
|
||||||
- name: Gather facts
|
|
||||||
setup:
|
|
||||||
delegate_facts: True
|
|
||||||
|
|
||||||
- name: Install requirements
|
|
||||||
package: name={{item}} state=present
|
|
||||||
with_items:
|
|
||||||
- fedpkg
|
|
||||||
|
|
||||||
# The dist doesn't actually matter here, it's just so we don't barf on
|
|
||||||
# private branches.
|
|
||||||
- name: Download and extract sources
|
|
||||||
command: fedpkg --dist=master prep
|
|
||||||
args:
|
|
||||||
chdir: "{{playbook_dir}}/.."
|
|
||||||
|
|
||||||
- name: Get source directory from environment
|
|
||||||
shell: rpm -q --specfile {{playbook_dir}}/../rpm-ostree.spec
|
|
||||||
--qf '{{playbook_dir}}/../%{NAME}-%{VERSION}\n' | head -n1
|
|
||||||
register: srcdir_query
|
|
||||||
|
|
||||||
- set_fact:
|
|
||||||
srcdir: "{{srcdir_query.stdout}}"
|
|
||||||
|
|
||||||
- name: Write out SSH config
|
|
||||||
copy:
|
|
||||||
content: "{{ssh_config}}"
|
|
||||||
dest: "{{srcdir}}/ssh-config"
|
|
||||||
|
|
||||||
- set_fact:
|
|
||||||
vmssh: ssh -F {{srcdir}}/ssh-config vmcheck
|
|
||||||
|
|
||||||
- name: Get rpm-ostree status
|
|
||||||
command: "{{vmssh}} rpm-ostree status --json"
|
|
||||||
|
|
||||||
- name: Run vmcheck
|
|
||||||
block:
|
|
||||||
- name: Start test
|
|
||||||
command: tests/vmcheck/multitest.py vmcheck
|
|
||||||
# XXX: consider making vmcheck become an installed test
|
|
||||||
environment:
|
|
||||||
VMTESTS: 1
|
|
||||||
TESTS: basic
|
|
||||||
topsrcdir: "{{srcdir}}"
|
|
||||||
commondir: "{{srcdir}}/tests/common"
|
|
||||||
args:
|
|
||||||
chdir: "{{srcdir}}"
|
|
||||||
|
|
||||||
always:
|
|
||||||
- name: Fetch test results
|
|
||||||
command: rsync -a --delete {{srcdir}}/vmcheck/ {{artifacts}}/vmcheck
|
|
||||||
|
Loading…
Reference in New Issue
Block a user