From 8b6b1b74f407d268e020781533c732e9392ccec7 Mon Sep 17 00:00:00 2001 From: sshil Date: Wed, 15 Jan 2025 10:47:34 +0530 Subject: [PATCH] Add tmt testcase for CI --- .fmf/version | 1 + plans/liberation-mono-fonts.fmf | 14 ++++++++++ plans/liberation-sans-fonts.fmf | 14 ++++++++++ plans/liberation-serif-fonts.fmf | 14 ++++++++++ tests/.gitignore | 3 --- tests/fonttest_playbook.yml | 45 -------------------------------- tests/tests.yml | 1 - 7 files changed, 43 insertions(+), 49 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/liberation-mono-fonts.fmf create mode 100644 plans/liberation-sans-fonts.fmf create mode 100644 plans/liberation-serif-fonts.fmf delete mode 100644 tests/.gitignore delete mode 100644 tests/fonttest_playbook.yml delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/liberation-mono-fonts.fmf b/plans/liberation-mono-fonts.fmf new file mode 100644 index 0000000..5a79f9b --- /dev/null +++ b/plans/liberation-mono-fonts.fmf @@ -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 diff --git a/plans/liberation-sans-fonts.fmf b/plans/liberation-sans-fonts.fmf new file mode 100644 index 0000000..bfbeacd --- /dev/null +++ b/plans/liberation-sans-fonts.fmf @@ -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 diff --git a/plans/liberation-serif-fonts.fmf b/plans/liberation-serif-fonts.fmf new file mode 100644 index 0000000..1465759 --- /dev/null +++ b/plans/liberation-serif-fonts.fmf @@ -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 diff --git a/tests/.gitignore b/tests/.gitignore deleted file mode 100644 index d993c8d..0000000 --- a/tests/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -tmp/ -artifacts/ -tests.retry \ No newline at end of file diff --git a/tests/fonttest_playbook.yml b/tests/fonttest_playbook.yml deleted file mode 100644 index 182e12a..0000000 --- a/tests/fonttest_playbook.yml +++ /dev/null @@ -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 }}" diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 8b93f92..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1 +0,0 @@ -- import_playbook: fonttest_playbook.yml \ No newline at end of file