Skip to content

Commit

Permalink
Mark check_linux_kernel_is_readable as xfail on Ubuntu 22.04
Browse files Browse the repository at this point in the history
Signed-off-by: Jono Yang <[email protected]>
  • Loading branch information
JonoYang committed May 15, 2024
1 parent 43b468d commit 30becb2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/extractcode/vmimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
import logging
import os
import pathlib
import platform
import shutil
import warnings

import attr
import pytest

from commoncode import fileutils
from commoncode.system import on_linux
Expand Down Expand Up @@ -74,6 +76,13 @@ def get_command(env_var=EXTRACTCODE_GUESTFISH_PATH_ENVVAR, command='guestfish'):
return cmd_loc


is_ubuntu_2204 = False
if on_linux:
freedesktop_os_release = platform.freedesktop_os_release()
is_ubuntu_2204 = freedesktop_os_release['ID'] == 'ubuntu' and freedesktop_os_release['VERSION_ID'] == '22.04'


@pytest.mark.xfail(is_ubuntu_2204, reason='Kernel is not readable on Ubuntu 22.04')
def check_linux_kernel_is_readable():
"""
Return True if the kernel executable file can be read. This is required by
Expand Down

0 comments on commit 30becb2

Please sign in to comment.