From: Luca Boccassi Date: Tue, 25 Oct 2022 14:02:10 +0000 (+0100) Subject: test/test-systemd-tmpfiles.py: do not fail if machine-id is missing X-Git-Tag: v252~30^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2d896f05940a1fcd0a590412c8731d4d9a33b71;p=thirdparty%2Fsystemd.git 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 --- diff --git a/test/test-systemd-tmpfiles.py b/test/test-systemd-tmpfiles.py index 4b3bdf33644..af9ff9bf931 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: