Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: teemtee/tmt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2ce3f778a8c6abde535cbe7622706cfc9b7efaca
Choose a base ref
..
head repository: teemtee/tmt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 18ad9830e0dbe8c9075ee691e5b4448e8d3f1d1f
Choose a head ref
Showing with 4,686 additions and 1,127 deletions.
  1. +30 −0 .github/workflows/doc-tests.yml
  2. +9 −3 .github/workflows/pre-commit.yml
  3. +1 −1 .github/workflows/release.yml
  4. +3 −0 .gitignore
  5. +1 −1 .packit.yaml
  6. +8 −0 .pre-commit-config.yaml
  7. +9 −9 .readthedocs.yaml
  8. +95 −8 Makefile
  9. +0 −4 containers/Containerfile.alpine
  10. +0 −4 containers/Containerfile.coreos
  11. +12 −0 containers/alpine/Containerfile
  12. +10 −0 containers/alpine/Containerfile.upstream
  13. +10 −0 containers/centos/7/Containerfile.upstream
  14. +10 −0 containers/centos/stream9/Containerfile.upstream
  15. +13 −0 containers/fedora/39/Containerfile
  16. +17 −0 containers/fedora/39/Containerfile.unprivileged
  17. +10 −0 containers/fedora/39/Containerfile.upstream
  18. +13 −0 containers/fedora/40/Containerfile
  19. +17 −0 containers/fedora/40/Containerfile.unprivileged
  20. +10 −0 containers/fedora/40/Containerfile.upstream
  21. +17 −0 containers/fedora/coreos/Containerfile
  22. +21 −0 containers/fedora/coreos/ostree/Containerfile
  23. +13 −0 containers/fedora/rawhide/Containerfile
  24. +17 −0 containers/fedora/rawhide/Containerfile.unprivileged
  25. +10 −0 containers/fedora/rawhide/Containerfile.upstream
  26. +10 −0 containers/ubi/8/Containerfile.upstream
  27. +10 −0 containers/ubuntu/22.04/Containerfile.upstream
  28. +4 −41 docs/Makefile
  29. +1 −1 docs/code/classes.rst
  30. +3 −0 docs/codespell.dic
  31. +1 −0 docs/codespell.ignore
  32. +25 −1 docs/conf.py
  33. +180 −16 docs/contribute.rst
  34. +3 −3 docs/examples.rst
  35. +28 −3 docs/guide.rst
  36. +40 −5 docs/overview.rst
  37. +1 −1 docs/plugins/index.rst
  38. +1 −1 docs/questions.rst
  39. +43 −3 docs/releases.rst
  40. +7 −0 docs/scripts/generate-plugins.py
  41. +12 −9 docs/templates/plugins.rst.j2
  42. +1 −1 docs/templates/story.rst.j2
  43. +1 −1 examples/l2/tooling.fmf
  44. +1 −1 examples/manual/full.md
  45. +1 −1 examples/vagrant/Vagrantfile.real_prod
  46. +0 −17 plans/install/docs.fmf
  47. +2 −1 plans/main.fmf
  48. +1 −1 plans/provision/artemis/sanity.fmf
  49. +16 −0 plans/provision/virtual.fmf
  50. +4 −4 prepare/podman-images.sh
  51. +48 −4 pyproject.toml
  52. +4 −0 spec/context/initiator.fmf
  53. +7 −3 spec/context/trigger.fmf
  54. +2 −2 spec/core/id.fmf
  55. +9 −1 spec/hardware/cpu.fmf
  56. +24 −0 spec/hardware/disk.fmf
  57. +19 −0 spec/hardware/location.fmf
  58. +6 −1 spec/hardware/virtualization.fmf
  59. +1 −1 spec/plans/context.fmf
  60. +1 −1 spec/plans/discover.fmf
  61. +1 −1 spec/plans/execute.fmf
  62. +2 −2 spec/plans/prepare.fmf
  63. +1 −1 spec/plans/report.fmf
  64. +49 −10 spec/plans/results.fmf
  65. +25 −6 spec/tests/duration.fmf
  66. +1 −1 spec/tests/path.fmf
  67. +55 −0 spec/tests/restart.fmf
  68. +1 −1 stories/cli/common.fmf
  69. +1 −1 stories/cli/config.fmf
  70. +3 −3 stories/cli/plan.fmf
  71. +1 −1 stories/cli/run.fmf
  72. +2 −2 stories/cli/steps.fmf
  73. +1 −1 stories/cli/test.fmf
  74. +1 −1 stories/cli/try.fmf
  75. +1 −1 stories/cli/usability.fmf
  76. +1 −1 stories/deferred/restraint.fmf
  77. +1 −1 stories/docs.fmf
  78. +1 −1 stories/features/reboot.fmf
  79. +1 −1 tests/core/environment-file/main.fmf
  80. +3 −3 tests/core/plan-env-file/test.sh
  81. +1 −0 tests/discover/data/distgit_test_plugin.py
  82. +2 −2 tests/discover/data/plans.fmf
  83. +7 −0 tests/discover/libraries/data/certificate.fmf
  84. +5 −0 tests/discover/libraries/data/plan.fmf
  85. +3 −0 tests/discover/libraries/test.sh
  86. +3 −3 tests/execute/reboot/basic.sh
  87. +2 −2 tests/execute/reboot/efi.sh
  88. +2 −0 tests/execute/reboot/out-of-session.sh
  89. +3 −3 tests/execute/reboot/reuse.sh
  90. +1 −0 tests/execute/restart/data/.fmf/version
  91. +7 −0 tests/execute/restart/data/plan.fmf
  92. +12 −0 tests/execute/restart/data/test.fmf
  93. +39 −0 tests/execute/restart/data/test.sh
  94. +17 −0 tests/execute/restart/main.fmf
  95. +59 −0 tests/execute/restart/test.sh
  96. +1 −1 tests/execute/result/custom.sh
  97. +8 −0 tests/execute/upgrade/data/test/test.sh
  98. +1 −1 tests/execute/upgrade/simple.sh
  99. +7 −2 tests/finish/ansible/test.sh
  100. +42 −0 tests/images.sh
  101. +1 −1 tests/lint/test/data/manual_test_failed/test.md
  102. +1 −1 tests/lint/test/data/manual_test_failed_2/test.md
  103. +1 −1 tests/lint/test/data/manual_test_passed/test.md
  104. +3 −3 tests/login/test.sh
  105. +2 −0 tests/prepare/adjust/main.fmf
  106. +16 −5 tests/prepare/adjust/test.sh
  107. +6 −2 tests/prepare/ansible/test.sh
  108. +2 −0 tests/prepare/feature/main.fmf
  109. +7 −1 tests/prepare/feature/test.sh
  110. +9 −17 tests/prepare/install/data/debuginfo.fmf
  111. +6 −0 tests/prepare/install/data/downloaded.fmf
  112. +8 −0 tests/prepare/install/data/empty.fmf
  113. +0 −2 tests/prepare/install/data/epel7.fmf
  114. +0 −2 tests/prepare/install/data/epel8-remote.fmf
  115. +8 −0 tests/prepare/install/data/epel9-remote.fmf
  116. +24 −6 tests/prepare/install/data/existing.fmf
  117. +3 −2 tests/prepare/install/data/main.fmf
  118. +11 −5 tests/prepare/install/data/missing.fmf
  119. +10 −7 tests/prepare/install/main.fmf
  120. +341 −44 tests/prepare/install/test.sh
  121. +2 −2 tests/prepare/recommend/data/test.fmf
  122. +7 −2 tests/prepare/recommend/test.sh
  123. +1 −1 tests/provision/become/data/main.fmf
  124. +4 −8 tests/provision/become/test.sh
  125. +10 −0 tests/provision/container/alpine/main.fmf
  126. +36 −0 tests/provision/container/alpine/test.sh
  127. +9 −1 tests/provision/ssh-options/test.sh
  128. +10 −8 tests/provision/user/test.sh
  129. +1 −1 tests/pull/results/test.sh
  130. 0 tests/run/again/{main.fmf → basic.fmf}
  131. +1 −0 tests/run/again/failed-only/data/.fmf/version
  132. +18 −0 tests/run/again/failed-only/data/plan.fmf
  133. +7 −0 tests/run/again/failed-only/data/test.fmf
  134. +2 −0 tests/run/again/failed-only/main.fmf
  135. +35 −0 tests/run/again/failed-only/test.sh
  136. +1 −1 tests/run/error/test.sh
  137. +8 −1 tests/test/check/data/main.fmf
  138. +1 −1 tests/test/check/test-avc.sh
  139. +46 −18 tests/test/check/test-dmesg.sh
  140. +10 −6 tests/test/check/test-watchdog.sh
  141. +1 −1 tests/test/debug/test.sh
  142. +1 −1 tests/unit/__init__.py
  143. +1 −1 tests/unit/manual_test/test.md
  144. +139 −57 tests/unit/provision/mrack/test_hw.py
  145. +2 −1 tests/unit/test.sh
  146. +1 −3 tests/unit/test_base.py
  147. +1 −1 tests/unit/test_export_to_nitrate.py
  148. +133 −40 tests/unit/test_hardware.py
  149. +814 −81 tests/unit/test_package_managers.py
  150. +2 −2 tests/unit/test_results.py
  151. +31 −15 tests/unit/test_utils.py
  152. +44 −12 tmt.spec
  153. +27 −6 tmt/base.py
  154. +2 −2 tmt/checks/avc.py
  155. +89 −39 tmt/checks/dmesg.py
  156. +10 −9 tmt/checks/watchdog.py
  157. +11 −13 tmt/cli.py
  158. +2 −4 tmt/convert.py
  159. +1 −1 tmt/export/nitrate.py
  160. +1 −1 tmt/export/polarion.py
  161. +235 −136 tmt/hardware.py
  162. +19 −2 tmt/libraries/beakerlib.py
  163. +2 −2 tmt/log.py
  164. +2 −1 tmt/options.py
  165. +3 −0 tmt/package_managers/__init__.py
  166. +1 −0 tmt/package_managers/apk.py
  167. +62 −13 tmt/package_managers/dnf.py
  168. +0 −4 tmt/package_managers/rpm_ostree.py
  169. +134 −28 tmt/plugins/__init__.py
  170. +1 −1 tmt/result.py
  171. +2 −1 tmt/schemas/common.yaml
  172. +3 −0 tmt/schemas/execute/tmt.yaml
  173. +3 −0 tmt/schemas/execute/upgrade.yaml
  174. +16 −0 tmt/schemas/provision/hardware.yaml
  175. +81 −28 tmt/schemas/results.yaml
  176. +17 −2 tmt/schemas/test.yaml
  177. +28 −14 tmt/steps/__init__.py
  178. +35 −10 tmt/steps/discover/__init__.py
  179. +7 −7 tmt/steps/discover/fmf.py
  180. +10 −4 tmt/steps/discover/shell.py
  181. +115 −13 tmt/steps/execute/__init__.py
  182. +45 −7 tmt/steps/execute/internal.py
  183. +1 −1 tmt/steps/execute/scripts/tmt-report-result
  184. +53 −1 tmt/steps/execute/upgrade.py
  185. +1 −1 tmt/steps/prepare/__init__.py
  186. +27 −13 tmt/steps/prepare/ansible.py
  187. +4 −2 tmt/steps/prepare/distgit.py
  188. +109 −7 tmt/steps/prepare/install.py
  189. +1 −0 tmt/steps/prepare/shell.py
  190. +58 −23 tmt/steps/provision/__init__.py
  191. +1 −1 tmt/steps/provision/local.py
  192. +56 −17 tmt/steps/provision/mrack.py
  193. +10 −2 tmt/steps/provision/mrack/mrack-provisioning-config.yaml
  194. +1 −1 tmt/steps/provision/testcloud.py
  195. +23 −23 tmt/steps/report/junit.py
  196. +1 −3 tmt/steps/report/polarion.py
  197. +5 −9 tmt/steps/report/reportportal.py
  198. +17 −12 tmt/trying.py
  199. +269 −92 tmt/utils.py
30 changes: 30 additions & 0 deletions .github/workflows/doc-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: test-docs
run-name: Documentation tests

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
doc-test:
name: Sphinx-${{ matrix.builder }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental || false }}
strategy:
fail-fast: false
matrix:
builder: [ html ]
include:
# Run default html builder with warnings as error
- builder: html
args: -W
steps:
- uses: actions/checkout@v4
- name: Run sphinx builder ${{ matrix.builder }}
run: |
pip install hatch
hatch run docs:${{ matrix.builder }} ${{ matrix.args }}
12 changes: 9 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -3,12 +3,18 @@ name: pre-commit
on:
pull_request:
push:
branches: [master]
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
env:
SKIP: no-commit-to-branch
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: |
3.9
3.x
- uses: pre-commit/action@v3.0.0
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
ref: ${{ github.event.inputs.ref }}

# Setup python
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -46,6 +46,9 @@ tmt.1
.mypy_cache
.pytest_cache
*.tgz
# Created by pytest-html reporting plugin
/assets/style.css
/report.html

# Virtual environment
.env
2 changes: 1 addition & 1 deletion .packit.yaml
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ jobs:
tf_extra_params:
test:
tmt:
name: /plans/(features/core|features/basic|install/docs)
name: /plans/features/(core|basic)

# Test pull requests (full)
# Do not run extended unit tests, that plan gets its own job because
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ repos:
rev: "v1.9.0"
hooks:
- id: mypy
language_version: "3.9"
# TODO: find out how to amend mypy, pyright, pre-commit and package requirements.
# Apparently, there is no easy way to avoid some level of duplication of
# information when the package is *not* installed, which is the case of tmt
@@ -68,6 +69,7 @@ repos:
rev: v1.1.357
hooks:
- id: pyright
language_version: "3.9"
# TODO: find out how to amend mypy, pyright, pre-commit and package requirements.
# Apparently, there is no easy way to avoid some level of duplication of
# information when the package is *not* installed, which is the case of tmt
@@ -153,3 +155,9 @@ repos:
# Help installation by reducing the set of inspected botocore release.
# There is *a lot* of them, and hatch might fetch many of them.
- "botocore>=1.25.10" # 1.25.10 is the current one available for RHEL9
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli # Required for python < 3.11
18 changes: 9 additions & 9 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Config for building https://tmt.readthedocs.io/
version: 2
python:
install:
- method: pip
path: .
extra_requirements:
- docs
build:
os: ubuntu-22.04
tools:
python: "3"
# Override RTD's default build commands, install hatch & delegate
# the rest to our Makefiles.
commands:
- cat docs/conf.py
- pip install hatch
- make BUILDDIR=$READTHEDOCS_OUTPUT docs
os: ubuntu-22.04
tools:
python: "3"
103 changes: 95 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -6,7 +6,10 @@

# Prepare variables
TMP = $(CURDIR)/tmp
UNIT_TESTS_IMAGE_TAG = tmt-unit-tests

ccred=$(shell tput setaf 1)
ccgreen=$(shell tput setaf 2)
ccend=$(shell tput sgr0)

# Define special targets
.DEFAULT_GOAL := help
@@ -83,19 +86,98 @@ images: ## Build tmt images for podman/docker
podman build -t tmt --squash -f ./containers/Containerfile.mini .
podman build -t tmt-all --squash -f ./containers/Containerfile.full .

images-unit-tests: image-unit-tests-alpine image-unit-tests-coreos ## Build images for unit tests
TMT_TEST_IMAGE_TARGET_PREFIX = images-tests
TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX = tmt/tests/container

TMT_TEST_CONTAINER_IMAGES := $(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/alpine:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/alpine/upstream:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/7/upstream:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/stream9/upstream:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/coreos:stable \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/coreos/ostree:stable \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/rawhide:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/rawhide/upstream:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/rawhide/unprivileged:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/40:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/40/upstream:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/40/unprivileged:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/39:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/39/upstream:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/39/unprivileged:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/ubi/8/upstream:latest \
$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/ubuntu/22.04/upstream:latest

TMT_TEST_IMAGES_TARGETS := $(foreach image,$(TMT_TEST_CONTAINER_IMAGES),images-tests/$(subst :,\:,$(image)))

images-tests: $(TMT_TEST_IMAGES_TARGETS) ## Build customized images for tests
podman images | grep 'localhost/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/' | sort

define test-container-image-target-to-name =
$(subst $(TMT_TEST_IMAGE_TARGET_PREFIX)/,,${1})
endef

define build-test-container-image =
@ echo "$(ccgreen)Building $(ccred)$(call test-container-image-target-to-name,$@)$(ccend) $(ccgreen)image...$(ccend)"
podman build -t $(call test-container-image-target-to-name,${1}) -f ./containers/${2} .
@ echo
endef

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/alpine\:latest:
$(call build-test-container-image,$@,alpine/Containerfile)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/alpine/upstream\:latest:
$(call build-test-container-image,$@,alpine/Containerfile.upstream)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/7/upstream\:latest:
$(call build-test-container-image,$@,centos/7/Containerfile.upstream)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/centos/stream9/upstream\:latest:
$(call build-test-container-image,$@,centos/stream9/Containerfile.upstream)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/coreos\:stable:
$(call build-test-container-image,$@,fedora/coreos/Containerfile)

image-unit-tests-alpine: ## Build local alpine image for unit tests
podman build -t alpine:$(UNIT_TESTS_IMAGE_TAG) -f ./containers/Containerfile.alpine .
$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/coreos/ostree\:stable:
$(call build-test-container-image,$@,fedora/coreos/ostree/Containerfile)

image-unit-tests-coreos: ## Build local CoreOS image for unit tests
podman build -t fedora-coreos:$(UNIT_TESTS_IMAGE_TAG) -f ./containers/Containerfile.coreos .
$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/rawhide\:latest:
$(call build-test-container-image,$@,fedora/rawhide/Containerfile)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/rawhide/upstream\:latest:
$(call build-test-container-image,$@,fedora/rawhide/Containerfile.upstream)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/rawhide/unprivileged\:latest:
$(call build-test-container-image,$@,fedora/rawhide/Containerfile.unprivileged)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/40\:latest:
$(call build-test-container-image,$@,fedora/40/Containerfile)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/40/upstream\:latest:
$(call build-test-container-image,$@,fedora/40/Containerfile.upstream)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/40/unprivileged\:latest:
$(call build-test-container-image,$@,fedora/40/Containerfile.unprivileged)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/39\:latest:
$(call build-test-container-image,$@,fedora/39/Containerfile)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/39/upstream\:latest:
$(call build-test-container-image,$@,fedora/39/Containerfile.upstream)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/39/unprivileged\:latest:
$(call build-test-container-image,$@,fedora/39/Containerfile.unprivileged)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/ubi/8/upstream\:latest:
$(call build-test-container-image,$@,ubi/8/Containerfile.upstream)

$(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/ubuntu/22.04/upstream\:latest:
$(call build-test-container-image,$@,ubuntu/22.04/Containerfile.upstream)

##
## Development
##
develop: _deps ## Install development requirements
sudo dnf install -y gcc git python3-nitrate {libvirt,krb5,libpq,python3}-devel jq podman buildah
sudo dnf install -y gcc git python3-nitrate {libvirt,krb5,libpq,python3}-devel jq podman buildah /usr/bin/python3.9

# Git vim tags and cleanup
tags:
@@ -113,11 +195,16 @@ clean: ## Remove all temporary files, packaging artifacts and docs
rm -rf examples/convert/{main.fmf,test.md,Manual} Manual
rm -f tests/full/repo_copy.tgz

clean-test-images: ## Remove all custom images built for tests
for image in $(TMT_TEST_CONTAINER_IMAGES); do \
podman rmi -i "$$image"; \
done

##
## Help!
##
help:: ## Show this help text
@gawk -vG=$$(tput setaf 2) -vR=$$(tput sgr0) ' \
@gawk -vG="$(ccgreen)" -vR="$(ccend)" ' \
match($$0, "^(([^#:]*[^ :]) *:)?([^#]*)##([^#].+|)$$",a) { \
if (a[2] != "") { printf " make %s%-18s%s %s\n", G, a[2], R, a[4]; next }\
if (a[3] == "") { print a[4]; next }\
4 changes: 0 additions & 4 deletions containers/Containerfile.alpine

This file was deleted.

4 changes: 0 additions & 4 deletions containers/Containerfile.coreos

This file was deleted.

12 changes: 12 additions & 0 deletions containers/alpine/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# An Alpine image tailored for tmt test suite
#
# tmt/tests/alpine:latest
#

FROM docker.io/library/alpine:3.19

# Populate apk cache
RUN apk update \
# Inject `bash` which is unavoidably required by tmt
&& apk add --no-cache bash
10 changes: 10 additions & 0 deletions containers/alpine/Containerfile.upstream
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# An Alpine image tailored for tmt test suite
#
# tmt/tests/alpine/upstream:latest
#

FROM docker.io/library/alpine:3.19

# Populate apk cache
RUN apk update
10 changes: 10 additions & 0 deletions containers/centos/7/Containerfile.upstream
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# A CentOS 7 image tailored for tmt test suite
#
# tmt/tests/centos/7/upstream:latest
#

FROM quay.io/centos/centos:7

# Populate yum cache
RUN yum makecache
10 changes: 10 additions & 0 deletions containers/centos/stream9/Containerfile.upstream
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# A CentOS Stream 9 image tailored for tmt test suite
#
# tmt/tests/centos/stream9/upstream:latest
#

FROM quay.io/centos/centos:stream9

# Populate dnf cache
RUN dnf makecache
13 changes: 13 additions & 0 deletions containers/fedora/39/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# A Fedora 39 image tailored for tmt test suite
#
# tmt/tests/fedora/39:latest
#

FROM quay.io/fedora/fedora:39

# Populate dnf cache
RUN dnf makecache \
# Inject `dnf5` to make things more complicated for `dnf` family of
# package manager implementations
&& dnf install -y dnf5
17 changes: 17 additions & 0 deletions containers/fedora/39/Containerfile.unprivileged
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# A Fedora 39 image tailored for tmt test suite, with unprivileged account & password-less sudo
#
# tmt/tests/fedora/39/unprivileged:latest
#

FROM quay.io/fedora/fedora:39

# Populate dnf cache
RUN dnf makecache \
# Create unprivileged user and setup sudo for it
&& dnf install -y /usr/sbin/useradd \
&& useradd fedora \
&& usermod -aG wheel fedora \
&& echo -e 'fedora\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

USER fedora
10 changes: 10 additions & 0 deletions containers/fedora/39/Containerfile.upstream
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# A Fedora 39 image tailored for tmt test suite
#
# tmt/tests/fedora/39/upstream:latest
#

FROM quay.io/fedora/fedora:39

# Populate dnf cache
RUN dnf makecache
13 changes: 13 additions & 0 deletions containers/fedora/40/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# A Fedora 40 image tailored for tmt test suite
#
# tmt/tests/fedora/40:latest
#

FROM quay.io/fedora/fedora:40

# Populate dnf cache
RUN dnf makecache \
# Inject `dnf5` to make things more complicated for `dnf` family of
# package manager implementations
&& dnf install -y dnf5
17 changes: 17 additions & 0 deletions containers/fedora/40/Containerfile.unprivileged
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# A Fedora 40 image tailored for tmt test suite, with unprivileged account & password-less sudo
#
# tmt/tests/fedora/40/unprivileged:latest
#

FROM quay.io/fedora/fedora:40

# Populate dnf cache
RUN dnf makecache \
# Create unprivileged user and setup sudo for it
&& dnf install -y /usr/sbin/useradd \
&& useradd fedora \
&& usermod -aG wheel fedora \
&& echo -e 'fedora\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

USER fedora
Loading