|
2 | 2 |
|
3 | 3 | set -exo pipefail |
4 | 4 |
|
| 5 | +cat /etc/redhat-release |
| 6 | + |
5 | 7 | if [[ "$(id -u)" -ne 0 ]];then |
6 | 8 | echo "Please run as superuser" |
7 | 9 | exit 1 |
8 | 10 | fi |
9 | 11 |
|
10 | 12 | if [[ -z "$1" ]]; then |
11 | | - echo -e "Usage: podman-tests.sh TEST_TYPE STREAM\nTEST_TYPE can be 'e2e' or 'system'\nSTREAM can be 'upstream' or 'downstream'" |
| 13 | + echo -e "Usage: $(basename ${BASH_SOURCE[0]}) TEST_TYPE\nTEST_TYPE can be 'e2e' or 'system'\n" |
12 | 14 | exit 1 |
13 | 15 | fi |
14 | 16 |
|
15 | 17 | TEST_TYPE=$1 |
16 | | -STREAM=$2 |
17 | | - |
18 | | -# `rhel` macro exists on RHEL, CentOS Stream, and Fedora ELN |
19 | | -# `centos` macro exists only on CentOS Stream |
20 | | -CENTOS_VERSION=$(rpm --eval '%{?centos}') |
21 | | -RHEL_VERSION=$(rpm --eval '%{?rhel}') |
22 | | - |
23 | | -# For upstream tests, we need to test with podman and other packages from the |
24 | | -# podman-next copr. For downstream tests (bodhi, errata), we don't need any |
25 | | -# additional setup |
26 | | -if [[ "$STREAM" == "upstream" ]]; then |
27 | | - # Use CentOS Stream 10 copr target for RHEL-10 until EPEL 10 becomes |
28 | | - # available |
29 | | - if [[ -n $CENTOS_VERSION || $RHEL_VERSION -ge 10 ]]; then |
30 | | - dnf -y copr enable rhcontainerbot/podman-next centos-stream-$CENTOS_VERSION |
31 | | - else |
32 | | - dnf -y copr enable rhcontainerbot/podman-next |
33 | | - fi |
34 | | - echo "priority=5" >> /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:rhcontainerbot:podman-next.repo |
35 | | -fi |
36 | 18 |
|
37 | 19 | # Remove testing-farm repos if they exist as these interfere with the packages |
38 | 20 | # we want to install, especially when podman-next copr is involved |
@@ -69,18 +51,11 @@ tar zxf *.tar.gz |
69 | 51 |
|
70 | 52 | popd |
71 | 53 |
|
72 | | -# Enable EPEL on RHEL/CentOS Stream envs to fetch bats |
73 | | -if [[ -n $(rpm --eval '%{?rhel}') ]]; then |
74 | | - # Until EPEL 10 is available use epel-9 for all RHEL and CentOS Stream |
75 | | - dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm |
76 | | - sed -i 's/$releasever/9/g' /etc/yum.repos.d/epel.repo |
77 | | -fi |
78 | | - |
79 | 54 | # Install dependencies for running tests |
| 55 | +# NOTE: bats will be fetched from Fedora repos on public testing-farm envs if EPEL repo is absent or disabled. |
80 | 56 | dnf -y install bats golang |
81 | 57 |
|
82 | 58 | # Print versions of distro and installed packages |
83 | | -cat /etc/redhat-release |
84 | 59 | rpm -q bats container-selinux golang podman podman-tests selinux-policy |
85 | 60 |
|
86 | 61 | if [[ "$TEST_TYPE" == "e2e" ]]; then |
|
0 commit comments