Add tmt testcase for CI

This commit is contained in:
sshil 2025-01-15 10:47:34 +05:30
parent e474b0e703
commit 8b6b1b74f4
7 changed files with 43 additions and 49 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,14 @@
summary: Fonts related tests for Liberation Mono
discover:
how: fmf
url: https://src.fedoraproject.org/tests/fonts
prepare:
name: tmt
how: install
package: liberation-mono-fonts
execute:
how: tmt
environment:
PACKAGE: liberation-mono-fonts
FONT_ALIAS: Courier New
FONT_FAMILY: Liberation Mono

View File

@ -0,0 +1,14 @@
summary: Fonts related tests for Liberation Sans
discover:
how: fmf
url: https://src.fedoraproject.org/tests/fonts
prepare:
name: tmt
how: install
package: liberation-sans-fonts
execute:
how: tmt
environment:
PACKAGE: liberation-sans-fonts
FONT_ALIAS: Arial
FONT_FAMILY: Liberation Sans

View File

@ -0,0 +1,14 @@
summary: Fonts related tests for Liberation Serif
discover:
how: fmf
url: https://src.fedoraproject.org/tests/fonts
prepare:
name: tmt
how: install
package: liberation-serif-fonts
execute:
how: tmt
environment:
PACKAGE: liberation-serif-fonts
FONT_ALIAS: Times New Roman
FONT_FAMILY: Liberation Serif

3
tests/.gitignore vendored
View File

@ -1,3 +0,0 @@
tmp/
artifacts/
tests.retry

View File

@ -1,45 +0,0 @@
- hosts: localhost
vars:
config:
fontname: liberation
lang: ["en","az-az","de","el","he"]
testgiturl: https://pagure.io/font_ci_testing.git
testgitclonepath: fonttest
testfilename: fonttest.py
testfilepath: /usr/local/bin
logfilepath: /tmp/test.log
artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
tags:
- classic
remote_user: root
tasks:
- name: Install required package
dnf:
name:
- git
- "{{ config.fontname }}-fonts"
- python3
- fontconfig
- name: git clone the tests
git:
repo: "{{ config.testgiturl }}"
dest: "{{ config.testgitclonepath }}"
force: yes
- name: Test Execution
block:
- name: Execute the tests
command: python3 {{ config.testgitclonepath }}/tests/{{ config.testfilename }} "{{ config }}"
always:
- name: Pull out the artifacts
fetch:
dest: "{{ config.artifacts }}/"
src: "{{ item }}"
flat: yes
with_items:
- "{{ config.logfilepath }}"

View File

@ -1 +0,0 @@
- import_playbook: fonttest_playbook.yml