Skip to content

Commit

Permalink
Deal with tumbleweed
Browse files Browse the repository at this point in the history
The sizes are slightly larger (Newer, aka bigger busybox package)
and /bin == /usr/bin so more files are in there that we need to skip
  • Loading branch information
dirkmueller committed Aug 8, 2023
1 parent b2b8ed2 commit 5648153
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/test_busybox.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from bci_tester.data import BUSYBOX_CONTAINER
from bci_tester.data import create_container_version_mark
from bci_tester.data import OS_VERSION


CONTAINER_IMAGES = [BUSYBOX_CONTAINER]
Expand All @@ -23,10 +24,10 @@ def test_busybox_provides_sh(auto_container):

#: size limits of the micro image per architecture in MiB
BUSYBOX_IMAGE_MAX_SIZE: Dict[str, int] = {
"x86_64": 14,
"aarch64": 14,
"s390x": 14,
"ppc64le": 14,
"x86_64": 16 if OS_VERSION == "tumbleweed" else 14,
"aarch64": 16 if OS_VERSION == "tumbleweed" else 14,
"s390x": 16 if OS_VERSION == "tumbleweed" else 14,
"ppc64le": 16 if OS_VERSION == "tumbleweed" else 14,
}


Expand All @@ -52,7 +53,7 @@ def test_busybox_links(auto_container):
"""Ensure all binaries in :file:`/bin` are links to :file:`/usr/bin/busybox`."""
auto_container.connection.run_expect(
[0],
'for i in /bin/*; do stat -c "%N" "$i" | grep "/usr/bin/busybox"; done',
'for i in /bin/*; do stat -c "%N" "$i" | grep -qE "(busybox|zmore|zless|zgrep|ldd|gencat|getent|locale|iconv|localedef|ld-linux|getconf)"; done',
)


Expand Down

0 comments on commit 5648153

Please sign in to comment.