re-import sources as agreed with the maintainer

This commit is contained in:
Adam Samalik 2023-07-10 08:50:32 +02:00
parent d7c93aef1d
commit a4eec75828
3 changed files with 67 additions and 2 deletions

3
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/fontpackages-1.44.tar.xz fontpackages-1.44.tar.xz
/fontpackages-1.44.tar.xz

33
tests/runtests.sh Normal file
View File

@ -0,0 +1,33 @@
#!/bin/bash
echo "Test for fontpackages-filesystem"
rpm -qf `rpm -E %_fontbasedir`|grep fontpackages-filesystem
retval=$?
echo $retval
if [ $retval -ne 0 ]; then
echo "FAILED: %_fontbasedir is not owned by fontpackages-filesystem"
else
echo "PASSED: %_fontbasedir is owned by fontpackages-filesystem"
fi
echo "Test for fontpackages-devel"
rpm -E %_font_pkg
retval=$?
echo $retval
if [ $retval -ne 0 ]; then
echo "FAILED: %_font_pkg macro is not available by fontpackages-devel"
else
echo "PASSED: %_font_pkg macro is available by fontpackages-devel"
fi
echo "Test dependencies of font packages"
rpm -q --requires lohit-devanagari-fonts|grep fontpackages-filesystem
retval=$?
echo $retval
if [ $retval -ne 0 ]; then
echo "FAILED: lohit-devanagari-fonts package does not require fontpackages-filesystem package"
else
echo "PASSED: lohit-devanagari-fonts package does require fontpackages-filesystem package"
fi

33
tests/tests.yml Normal file
View File

@ -0,0 +1,33 @@
- hosts: localhost
vars:
- artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
tags:
- classic
remote_user: root
tasks:
- name: Install required packages
dnf:
name:
- lohit-devanagari-fonts
- name: Install the test files
copy: src={{ item.file }} dest=/tmp/{{ item.dest }} mode=0755
with_items:
- {file: runtests.sh, dest: runtests.sh }
- name: Test block
block:
- name: Execute the tests
shell: |
/tmp/runtests.sh &> /tmp/test.log && result=pass || result=fail
echo -e "results:\n- {result: $result, test: simple}" > /tmp/results.yml
always:
- name: Pull out the logs
fetch:
dest: "{{ artifacts }}/"
src: "{{ item }}"
flat: yes
with_items:
- /tmp/test.log
- /tmp/results.yml