From b2d896f05940a1fcd0a590412c8731d4d9a33b71 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 25 Oct 2022 15:02:10 +0100 Subject: [PATCH] test/test-systemd-tmpfiles.py: do not fail if machine-id is missing When building in a chroot there might not be any machine-id --- test/test-systemd-tmpfiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-systemd-tmpfiles.py b/test/test-systemd-tmpfiles.py index 4b3bdf3364..af9ff9bf93 100755 --- a/test/test-systemd-tmpfiles.py +++ b/test/test-systemd-tmpfiles.py @@ -87,7 +87,7 @@ def test_content(line, expected, *, user, extra={}, subpath='/arg', path_cb=None def test_valid_specifiers(*, user): test_content('f {} - - - - two words', 'two words', user=user) - if id128: + if id128 and os.path.isfile('/etc/machine-id'): try: test_content('f {} - - - - %m', '{}'.format(id128.get_machine().hex), user=user) except AssertionError as e: