Skip to content

Commit e6c81cf

Browse files
npigginhuth
authored andcommitted
tests/functional/test_ppc64_hv: Update repo management
`setup-apkrepos` can be used to set repos rather than open-coding URLs. Signed-off-by: Nicholas Piggin <[email protected]> Message-ID: <[email protected]> Signed-off-by: Thomas Huth <[email protected]>
1 parent 8c8dd70 commit e6c81cf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/functional/test_ppc64_hv.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ def do_start_alpine(self):
8181
exec_command_and_wait_for_pattern(self, 'date -s "' + datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S' + '"'), ps1)
8282
ps1='alpine:~#'
8383
exec_command_and_wait_for_pattern(self, 'setup-alpine -qe', ps1)
84+
exec_command_and_wait_for_pattern(self, 'setup-apkrepos -c1', ps1)
85+
exec_command_and_wait_for_pattern(self, 'apk update', ps1)
86+
# Could upgrade here but it usually should not be necessary
87+
# exec_command_and_wait_for_pattern(self, 'apk upgrade --available', ps1)
8488

8589
def do_stop_alpine(self):
8690
exec_command(self, 'echo "TEST ME"')
@@ -91,9 +95,6 @@ def do_stop_alpine(self):
9195

9296
def do_setup_kvm(self):
9397
ps1='alpine:~#'
94-
exec_command_and_wait_for_pattern(self, 'echo http://dl-cdn.alpinelinux.org/alpine/v3.18/main > /etc/apk/repositories', ps1)
95-
exec_command_and_wait_for_pattern(self, 'echo http://dl-cdn.alpinelinux.org/alpine/v3.18/community >> /etc/apk/repositories', ps1)
96-
exec_command_and_wait_for_pattern(self, 'apk update', ps1)
9798
exec_command_and_wait_for_pattern(self, 'apk add qemu-system-ppc64', ps1)
9899
exec_command_and_wait_for_pattern(self, 'modprobe kvm-hv', ps1)
99100

0 commit comments

Comments
 (0)