diff --git a/src/distro/distro.py b/src/distro/distro.py index 4d08067..384b453 100755 --- a/src/distro/distro.py +++ b/src/distro/distro.py @@ -220,6 +220,7 @@ def id() -> str: "opensuse" openSUSE "amzn" Amazon Linux "arch" Arch Linux + "buildroot" Buildroot "cloudlinux" CloudLinux OS "exherbo" Exherbo Linux "gentoo" GenToo Linux diff --git a/tests/resources/distros/buildroot/etc/os-release b/tests/resources/distros/buildroot/etc/os-release new file mode 100644 index 0000000..3aeb531 --- /dev/null +++ b/tests/resources/distros/buildroot/etc/os-release @@ -0,0 +1,5 @@ +NAME=Buildroot +VERSION=2022.02 +ID=buildroot +VERSION_ID=2022.02 +PRETTY_NAME="Buildroot 2022.02" diff --git a/tests/test_distro.py b/tests/test_distro.py index b40b3aa..c7f884f 100644 --- a/tests/test_distro.py +++ b/tests/test_distro.py @@ -163,6 +163,17 @@ def test_arch_os_release(self) -> None: } self._test_outcome(desired_outcome) + def test_buildroot_os_release(self) -> None: + desired_outcome = { + "id": "buildroot", + "name": "Buildroot", + "pretty_name": "Buildroot 2022.02", + "version": "2022.02", + "pretty_version": "2022.02", + "best_version": "2022.02", + } + self._test_outcome(desired_outcome) + def test_kali_os_release(self) -> None: desired_outcome = { "id": "kali",