tests: Restore missing pykickstart tests

This commit is contained in:
Brian C. Lane 2023-03-14 14:59:35 -07:00
parent 96aee26202
commit 4e940c091e
4 changed files with 57 additions and 0 deletions

1
tests/.fmf/version Normal file
View File

@ -0,0 +1 @@
1

5
tests/provision.fmf Normal file
View File

@ -0,0 +1,5 @@
---
standard-inventory-qcow2:
qemu:
m: 2G

26
tests/scripts/run_tests.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
PATH=/usr/bin:/usr/local/bin
SRC="$1"
cd "${SRC}" || exit 1
# Install test suite dependencies that are only available in
# certain package repos. Since this is throw-away, just install
# using pip.
pip-3 install pocketlint
pip-3 install ordered_set
pip-3 install nose==1.3.6
# Install required packages
dnf install -y git
# We need the translation canary in place too
[ -d translation-canary ] || git clone https://github.com/rhinstaller/translation-canary
# Run the test suite
make check || exit $?
make coverage COVERAGE=coverage-3 NOSE_PROCESSES=0 NOSE_PROCESS_TIMEOUT=60 || exit $?
exit 0

25
tests/tests.yml Normal file
View File

@ -0,0 +1,25 @@
---
# Run pykickstart's test suite
#
# playbook based on pyparted.
#
- hosts: localhost
roles:
# Fetch package source
- role: standard-test-source
tags:
- classic
- role: standard-test-basic
tags:
- classic
required_packages:
- make
- git
- python3-coverage
- python3-devel
- redhat-rpm-config
tests:
- simple:
dir: scripts/
run: ./run_tests.sh ../source