@@ -90,7 +90,13 @@ function get_dist_name() {
9090@test " find: Find mirror if executed with arguments" {
9191 assert_exitcode $RC_OK find --sample-size 10 --healthchecks 8 --ignore-sync-state --speedtests 2 --country DE
9292 assert_regex " $output " ' Randomly selecting 8 mirrors...done'
93- assert_regex " $output " ' Speed testing 2 of the available'
93+ arch=$( dpkg --print-architecture 2> /dev/null || echo amd64)
94+ if [[ $arch == arm64 || $arch == armhf ]]; then
95+ # On Ubuntu ARM, depending on country, there currently may be fewer than 2 reachable ubuntu-ports mirrors.
96+ assert_regex " $output " ' Speed testing [12] of the available'
97+ else
98+ assert_regex " $output " ' Speed testing 2 of the available'
99+ fi
94100 assert_regex " $output " ' (sample download size: 10KB)'
95101 assert_regex " $output " ' => (https?|ftp)://.* determined as fastest mirror'
96102 refute_regex " $output " ' ERROR:'
@@ -99,7 +105,13 @@ function get_dist_name() {
99105@test " find: Find mirror with --ignore-sync-state only" {
100106 assert_exitcode $RC_OK find --ignore-sync-state --speedtests 2 --healthchecks 8 --country DE
101107 assert_regex " $output " ' Randomly selecting 8 mirrors...done'
102- assert_regex " $output " ' Speed testing 2 of the available'
108+ arch=$( dpkg --print-architecture 2> /dev/null || echo amd64)
109+ if [[ $arch == arm64 || $arch == armhf ]]; then
110+ # On Ubuntu ARM, depending on country, there currently may be fewer than 2 reachable ubuntu-ports mirrors.
111+ assert_regex " $output " ' Speed testing [12] of the available'
112+ else
113+ assert_regex " $output " ' Speed testing 2 of the available'
114+ fi
103115 assert_regex " $output " ' => (https?|ftp)://.* determined as fastest mirror'
104116 refute_regex " $output " ' Fastest mirror detection returned invalid URL'
105117}
@@ -150,7 +162,9 @@ function get_dist_name() {
150162 arch=$( dpkg --print-architecture 2> /dev/null || echo amd64)
151163 if [[ $arch == arm64 || $arch == armhf ]]; then
152164 mirror_url1=http://ports.ubuntu.com/ubuntu-ports
153- mirror_url2=http://ftp.tu-chemnitz.de/pub/linux/ubuntu-ports
165+ # Avoid flaky third-party mirrors on ARM (mirror sync in progress can break apt-get update).
166+ # Use ports.ubuntu.com with a trailing-slash variant to still test set changes.
167+ mirror_url2=http://ports.ubuntu.com/ubuntu-ports/
154168 else
155169 mirror_url1=http://archive.ubuntu.com/ubuntu
156170 mirror_url2=https://ftp.uni-stuttgart.de/ubuntu
0 commit comments