@@ -17,19 +17,6 @@ use containers::bats;
17
17
18
18
my $oci_runtime ;
19
19
20
- sub install_git {
21
- # We need git 2.47.0+ to use `--ours` with `git apply -3`
22
- if (is_sle) {
23
- my $version = get_var(" VERSION" );
24
- if (is_sle(' <16' )) {
25
- $version =~ s / -/ _/ ;
26
- $version = " SLE_$version " ;
27
- }
28
- assert_script_run " zypper addrepo https://download.opensuse.org/repositories/Kernel:/tools/$version /Kernel:tools.repo" ;
29
- }
30
- assert_script_run " zypper --gpg-auto-import-keys -n install --allow-vendor-change git-core" , timeout => 300;
31
- }
32
-
33
20
sub setup {
34
21
my @pkgs = qw( aardvark-dns apache2-utils buildah catatonit glibc-devel-static go1.24 gpg2 jq libgpgme-devel
35
22
libseccomp-devel make netavark openssl podman podman-remote skopeo socat sudo systemd-container xfsprogs) ;
@@ -43,20 +30,20 @@ sub setup {
43
30
record_info " info" , script_output(" podman info -f json" );
44
31
45
32
# Workaround for https://bugzilla.opensuse.org/show_bug.cgi?id=1248988 - catatonit missing in /usr/libexec/podman/
46
- assert_script_run " cp /usr/bin/catatonit /usr/libexec/podman/catatonit" ;
33
+ run_command " cp -f /usr/bin/catatonit /usr/libexec/podman/catatonit" ;
47
34
# rootless user needed for these tests
48
- assert_script_run " useradd -m containers" ;
49
- assert_script_run " usermod --add-subuids 100000-165535 containers" ;
50
- assert_script_run " usermod --add-subgids 100000-165535 containers" ;
35
+ run_command " useradd -m containers" ;
36
+ run_command " usermod --add-subuids 100000-165535 containers" ;
37
+ run_command " usermod --add-subgids 100000-165535 containers" ;
51
38
# Make /run/secrets directory available on containers
52
- assert_script_run " echo /var/lib/empty:/run/secrets >> /etc/containers/mounts.conf" ;
39
+ run_command " echo /var/lib/empty:/run/secrets >> /etc/containers/mounts.conf" ;
53
40
54
41
# Enable SSH
55
42
my $algo = " ed25519" ;
56
43
systemctl ' enable --now sshd' ;
57
- assert_script_run " ssh-keygen -t $algo -N '' -f ~/.ssh/id_$algo " ;
58
- assert_script_run " cat ~/.ssh/id_$algo .pub >> ~/.ssh/authorized_keys" ;
59
- assert_script_run " ssh-keyscan localhost 127.0.0.1 ::1 | tee -a ~/.ssh/known_hosts" ;
44
+ run_command " ssh-keygen -t $algo -N '' -f ~/.ssh/id_$algo " ;
45
+ run_command " cat ~/.ssh/id_$algo .pub >> ~/.ssh/authorized_keys" ;
46
+ run_command " ssh-keyscan localhost 127.0.0.1 ::1 | tee -a ~/.ssh/known_hosts" ;
60
47
61
48
# Download podman sources
62
49
my $version = script_output q( podman --version | awk '{ print $3 }') ;
@@ -75,9 +62,9 @@ sub setup {
75
62
$branch = $repo ;
76
63
}
77
64
78
- assert_script_run " cd ~" ;
79
- assert_script_run " git clone --branch $branch https://github.com/$github_org /podman" , timeout => 300;
80
- assert_script_run " cd ~/podman" ;
65
+ run_command " cd ~" ;
66
+ run_command " git clone --branch $branch https://github.com/$github_org /podman" , timeout => 300;
67
+ run_command " cd ~/podman" ;
81
68
82
69
unless ($repo ) {
83
70
# - https://github.com/containers/podman/pull/26934 - test/e2e: fix 'block all syscalls' seccomp for runc
@@ -87,11 +74,11 @@ sub setup {
87
74
my $url = " https://github.com/$github_org /podman/pull/$patch " ;
88
75
record_info(" patch" , $url );
89
76
assert_script_run " curl -O " . data_url(" containers/patches/podman/$patch .patch" );
90
- assert_script_run " git apply -3 --ours $patch .patch" ;
77
+ run_command " git apply -3 --ours $patch .patch" ;
91
78
}
92
79
# This test fails with:
93
80
# Command exited 125 as expected, but did not emit 'failed to connect: dial tcp: lookup '
94
- assert_script_run " rm -f test/e2e/image_scp_test.go" ;
81
+ run_command " rm -f test/e2e/image_scp_test.go" ;
95
82
}
96
83
}
97
84
@@ -113,7 +100,7 @@ sub run {
113
100
my $env = join " " , map { " $_ =$env {$_ }" } sort keys %env ;
114
101
115
102
foreach my $target (qw( localintegration remoteintegration) ) {
116
- script_run " env $env make $target |& tee $target .txt" , timeout => 1800;
103
+ run_command " env $env make $target |& tee $target .txt || true " , timeout => 1800;
117
104
script_run qq{ sed -ri '0,/name=/s/name="Libpod Suite"/name="$target "/' report.xml} ;
118
105
script_run " mv -v report.xml $target .xml" ;
119
106
parse_extra_log(XUnit => " $target .xml" );
0 commit comments