podman-3.0.0-0.8.el9
- use dedicated macro to build only on supported arches Signed-off-by: Jindrich Novy <jnovy@redhat.com>
This commit is contained in:
parent
842ba6765b
commit
e2e36d3fb0
1441
.gitignore
vendored
1441
.gitignore
vendored
File diff suppressed because it is too large
Load Diff
5299
podman.spec
5299
podman.spec
File diff suppressed because it is too large
Load Diff
5
sources
5
sources
@ -1,2 +1,3 @@
|
||||
SHA512 (dnsname-c654c95.tar.gz) = 34c844ca3ebe24b069077836d27e828ebbfd61c13e0aa943838af9aae475258c3f02e7d1c5e61362cb6904287eee4e3fc85cc2879216e1a8e1142b69731926f0
|
||||
SHA512 (podman-9180872.tar.gz) = da27a9de260be012aba833910d8be20cad7515eab8b1763d5a270e6a753df0196464e65fc82645137a0b477a6cbb1e35694aed2d1e572ec9671e507ea8bbbae2
|
||||
SHA512 (v0.1.5.tar.gz) = 75387cf9c611222ef0afc9f688cefb3e4a4ec388cfa9d2329ee7860cb2ad83afa9311f53c1047f92f7adde27b7eb07f5501ee602334e610a3227104d8894486b
|
||||
SHA512 (v1.0.0.tar.gz) = 6eb96939847dcb4bb6fcfbf2e9e1555c1e79b0b77350b2669d4e517decdda1784fbe68536419fd5ba81bfc6b47c57665487c62e5fde7e0d2b129f0161f421b83
|
||||
SHA512 (master-0c96731.tar.gz) = df166a14fcbb586b9d34106b3ab35d16d243c064f26d1622764d4816ca0a09b382a73df6078a9a20b0af835a753262543d6d37d118c9d7fea13b76b6b5ced039
|
||||
|
@ -7,46 +7,52 @@
|
||||
# directory /usr/share/foo/test/system, containing one or more .bats
|
||||
# test files.
|
||||
#
|
||||
# We create two files:
|
||||
#
|
||||
# /tmp/test.summary.log - one-liner with FAIL, PASS, ERROR and a blurb
|
||||
# /tmp/test.bats.log - full log of this script, plus the BATS run
|
||||
#
|
||||
|
||||
export PATH=/usr/local/bin:/usr/sbin:/usr/bin
|
||||
|
||||
FULL_LOG=/tmp/test.bats.log
|
||||
rm -f $FULL_LOG
|
||||
touch $FULL_LOG
|
||||
FULL_LOG=/tmp/test.debug.log
|
||||
BATS_LOG=/tmp/test.bats.log
|
||||
rm -f $FULL_LOG $BATS_LOG
|
||||
touch $FULL_LOG $BATS_LOG
|
||||
|
||||
# Preserve output to a log file, but also emit on stdout. This covers
|
||||
# RHEL (which preserves logfiles but runs ansible without --verbose)
|
||||
# and Fedora (which hides logfiles but runs ansible --verbose).
|
||||
exec &> >(tee -a $FULL_LOG)
|
||||
exec &> $FULL_LOG
|
||||
|
||||
# Log program versions
|
||||
echo "Packages:"
|
||||
rpm -qa |\
|
||||
egrep 'podman|conmon|crun|runc|iptable|slirp|systemd|container-selinux' |\
|
||||
sort |\
|
||||
sed -e 's/^/ /'
|
||||
rpm -q ${TEST_PACKAGE} ${TEST_PACKAGE}-tests
|
||||
|
||||
divider='------------------------------------------------------------------'
|
||||
echo $divider
|
||||
echo "------------------------------"
|
||||
printenv | sort
|
||||
echo $divider
|
||||
|
||||
testdir=/usr/share/${TEST_PACKAGE}/test/system
|
||||
|
||||
if ! cd $testdir; then
|
||||
echo "FAIL ${TEST_NAME} : cd $testdir" > /tmp/test.summary.log
|
||||
echo "FAIL ${TEST_NAME} : cd $testdir" >> /tmp/test.log
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -e /tmp/helper.sh ]; then
|
||||
echo "------------------------------"
|
||||
echo ". /tmp/helper.sh"
|
||||
. /tmp/helper.sh
|
||||
fi
|
||||
|
||||
if [ "$(type -t setup)" = "function" ]; then
|
||||
echo "------------------------------"
|
||||
echo "\$ setup"
|
||||
setup
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "FAIL ${TEST_NAME} : setup" >> /tmp/test.log
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "------------------------------"
|
||||
echo "\$ bats ."
|
||||
bats .
|
||||
bats . &> $BATS_LOG
|
||||
rc=$?
|
||||
|
||||
echo $divider
|
||||
echo "------------------------------"
|
||||
echo "bats completed with status $rc"
|
||||
|
||||
status=PASS
|
||||
@ -54,7 +60,13 @@ if [ $rc -ne 0 ]; then
|
||||
status=FAIL
|
||||
fi
|
||||
|
||||
echo "${status} ${TEST_NAME}" > /tmp/test.summary.log
|
||||
echo "${status} ${TEST_NAME}" >> /tmp/test.log
|
||||
|
||||
if [ "$(type -t teardown)" = "function" ]; then
|
||||
echo "------------------------------"
|
||||
echo "\$ teardown"
|
||||
teardown
|
||||
fi
|
||||
|
||||
# FIXME: for CI purposes, always exit 0. This allows subsequent tests.
|
||||
exit 0
|
||||
|
@ -8,3 +8,30 @@
|
||||
with_items: "{{ tests }}"
|
||||
loop_control:
|
||||
loop_var: test
|
||||
|
||||
- name: pull test.log results
|
||||
fetch:
|
||||
src: "/tmp/test.log"
|
||||
dest: "{{ artifacts }}/test.log"
|
||||
flat: yes
|
||||
|
||||
# Copied from standard-test-basic
|
||||
- name: check results
|
||||
shell: grep "^FAIL" /tmp/test.log
|
||||
register: test_fails
|
||||
# Never fail at this step. Just store result of tests.
|
||||
failed_when: False
|
||||
|
||||
- name: preserve results
|
||||
set_fact:
|
||||
role_result_failed: "{{ (test_fails.stdout|d|length > 0) or (test_fails.stderr|d|length > 0) }}"
|
||||
role_result_msg: "{{ test_fails.stdout|d('tests failed.') }}"
|
||||
|
||||
- name: display results
|
||||
vars:
|
||||
msg: |
|
||||
Tests failed: {{ role_result_failed|d('Undefined') }}
|
||||
Tests msg: {{ role_result_msg|d('None') }}
|
||||
debug:
|
||||
msg: "{{ msg.split('\n') }}"
|
||||
failed_when: "role_result_failed|bool"
|
||||
|
@ -25,17 +25,14 @@
|
||||
copy: src=helper.{{ test_name_oneword }}.sh dest=/tmp/helper.sh
|
||||
when: helper.stat.exists
|
||||
|
||||
# This is what runs the BATS tests.
|
||||
- name: "{{ test.name }} | run test"
|
||||
script: ./run_bats_tests.sh
|
||||
args:
|
||||
chdir: /usr/share/{{ test.package }}/test/system
|
||||
become: "{{ true if test.become is defined else false }}"
|
||||
become_user: "{{ rootless_user }}"
|
||||
become_user: testuser
|
||||
environment: "{{ local_environment | combine(test.environment) }}"
|
||||
|
||||
# BATS tests will always exit zero and should leave behind two files:
|
||||
# a full log (test.bats.log) and a one-line PASS/FAIL file (.summary.log)
|
||||
- name: "{{ test.name }} | pull logs"
|
||||
fetch:
|
||||
src: "/tmp/test.{{ item }}.log"
|
||||
@ -43,25 +40,7 @@
|
||||
flat: yes
|
||||
with_items:
|
||||
- bats
|
||||
- summary
|
||||
|
||||
# Collect all the one-line PASS/FAIL results in one file, test.log
|
||||
# Write the same thing, in a different format, to results.yml
|
||||
# https://docs.fedoraproject.org/en-US/ci/standard-test-interface/
|
||||
- name: "{{ test.name }} | keep running tally of test results"
|
||||
local_action:
|
||||
module: shell
|
||||
cmd: |
|
||||
cd {{ artifacts }}
|
||||
cat "test.{{ test_name_oneword }}.summary.log" >>test.log
|
||||
|
||||
status=$(awk '{print $1}' <test.{{ test_name_oneword }}.summary.log | tr A-Z a-z)
|
||||
echo "- test: {{ test.name }}" >>results.yml
|
||||
echo " result: $status" >>results.yml
|
||||
echo " logs: test.{{ test_name_oneword }}.bats.log" >>results.yml
|
||||
|
||||
# delete the oneliner file, to keep artifacts dir clean
|
||||
rm -f test.{{ test_name_oneword }}.summary.log
|
||||
- debug
|
||||
|
||||
- name: "{{ test.name }} | remove remote logs and helpers"
|
||||
file:
|
||||
@ -69,19 +48,5 @@
|
||||
state=absent
|
||||
with_items:
|
||||
- test.bats.log
|
||||
- test.summary.log
|
||||
- test.debug.log
|
||||
- helper.sh
|
||||
|
||||
# AAAAARGH!
|
||||
#
|
||||
# Fedora gating tests are failing, because str-common-final/tasks/main.yml
|
||||
# tries to pull test.log and other logs from $remote_host:/tmp/artifacts .
|
||||
# Those don't exist, because I track status and artifacts locally, because
|
||||
# with the reboot I can't rely on /tmp being preserved.
|
||||
# I see no way to tell str-common-final to skip this step; so let's just
|
||||
# push logs over upon completion of each subtest.
|
||||
- name: keep remote artifacts synced
|
||||
synchronize:
|
||||
src: "{{ artifacts }}/"
|
||||
dest: "{{ remote_artifacts|d('/tmp/artifacts') }}/"
|
||||
mode: push
|
||||
|
@ -1 +1,36 @@
|
||||
- import_playbook: test_podman.yml
|
||||
---
|
||||
- hosts: localhost
|
||||
tags: classic
|
||||
vars:
|
||||
- artifacts: ./artifacts
|
||||
roles:
|
||||
- role: bats_installed
|
||||
- role: nonroot_user
|
||||
- role: run_bats_tests
|
||||
tests:
|
||||
- name: podman root
|
||||
package: podman
|
||||
environment:
|
||||
PODMAN: /usr/bin/podman
|
||||
|
||||
- name: podman nonroot
|
||||
package: podman
|
||||
environment:
|
||||
PODMAN: /usr/bin/podman
|
||||
become: true
|
||||
|
||||
#- name: podman-remote root
|
||||
#package: podman
|
||||
#environment:
|
||||
# PODMAN: /usr/bin/podman-remote
|
||||
|
||||
- name: buildah root
|
||||
package: buildah
|
||||
environment:
|
||||
BUILDAH_BINARY: /usr/bin/buildah
|
||||
IMGTYPE_BINARY: /usr/bin/buildah-imgtype
|
||||
|
||||
- name: skopeo root
|
||||
package: skopeo
|
||||
environment:
|
||||
SKOPEO_BINARY: /usr/bin/skopeo
|
||||
|
Loading…
Reference in New Issue
Block a user