Migrate to TMT-style gating in C9S
This is required for RHIVOS, see VROOM-23635.
This commit is contained in:
parent
4562dee4d1
commit
f6aedb70ea
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
2
ci.fmf
Normal file
2
ci.fmf
Normal file
@ -0,0 +1,2 @@
|
||||
# Docs: https://docs.fedoraproject.org/en-US/ci/tmt/#_multiple_plans
|
||||
resultsdb-testcase: separate
|
@ -1,7 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
- rhel-*
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1-legacy.functional}
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1-unified.functional}
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional}
|
||||
|
10
plans.fmf
Normal file
10
plans.fmf
Normal file
@ -0,0 +1,10 @@
|
||||
/tier1-internal:
|
||||
discover:
|
||||
how: fmf
|
||||
url: https://gitlab.com/redhat/rhel/tests/systemd.git
|
||||
filter: 'tier: 1'
|
||||
execute:
|
||||
how: tmt
|
||||
adjust:
|
||||
enabled: false
|
||||
when: distro == centos-stream or distro == fedora
|
@ -1,50 +0,0 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
vars:
|
||||
- artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
|
||||
tags:
|
||||
- classic
|
||||
tasks:
|
||||
# switch SELinux to permissive mode
|
||||
- name: Get default kernel
|
||||
command: "grubby --default-kernel"
|
||||
register: default_kernel
|
||||
- debug: msg="{{ default_kernel.stdout }}"
|
||||
- name: Set permissive mode
|
||||
command: "grubby --args=enforcing=0 --update-kernel {{ default_kernel.stdout }}"
|
||||
|
||||
- name: reboot
|
||||
block:
|
||||
- name: restart host
|
||||
shell: sleep 2 && shutdown -r now "Ansible updates triggered"
|
||||
async: 1
|
||||
poll: 0
|
||||
ignore_errors: true
|
||||
|
||||
- name: wait for host to come back
|
||||
wait_for_connection:
|
||||
delay: 10
|
||||
timeout: 300
|
||||
|
||||
- name: Re-create /tmp/artifacts
|
||||
command: mkdir /tmp/artifacts
|
||||
|
||||
- name: Gather SELinux denials since boot
|
||||
shell: |
|
||||
result=pass
|
||||
dmesg | grep -i -e type=1300 -e type=1400 > /tmp/avc.log && result=fail
|
||||
ausearch -m avc -m selinux_err -m user_avc -ts boot &>> /tmp/avc.log
|
||||
grep -q '<no matches>' /tmp/avc.log || result=fail
|
||||
echo -e "\nresults:\n- test: reboot and collect AVC\n result: $result\n logs:\n - avc.log\n\n" > /tmp/results.yml
|
||||
( [ $result = "pass" ] && echo PASS test-reboot || echo FAIL test-reboot ) > /tmp/test.log
|
||||
|
||||
always:
|
||||
- name: Pull out the artifacts
|
||||
fetch:
|
||||
dest: "{{ artifacts }}/"
|
||||
src: "{{ item }}"
|
||||
flat: yes
|
||||
with_items:
|
||||
- /tmp/test.log
|
||||
- /tmp/avc.log
|
||||
- /tmp/results.yml
|
Loading…
Reference in New Issue
Block a user