From 7e40098bc6a0aefe60676d2d0c237fba2e8912c9 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Tue, 4 Aug 2026 21:00:15 +0200 Subject: [PATCH] test(decky): tear the CLI fixture dir down before building it The "a native install with no sibling CLI resolves to None" check created /tmp/pf-test-native/bin/punktfunk and never removed it, so the assertion that the sibling is ABSENT held only on the first run on a given machine and failed on every rerun. Caught by running the suite twice. --- clients/decky/scripts/test-backend.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clients/decky/scripts/test-backend.py b/clients/decky/scripts/test-backend.py index 4f4ad9f5..ea04ddf3 100644 --- a/clients/decky/scripts/test-backend.py +++ b/clients/decky/scripts/test-backend.py @@ -61,6 +61,12 @@ check( # A native install: the CLI is the client binary's sibling. Absent => no CLI at all, which the # caller must see as "unavailable" rather than as an empty result. +# +# The fixture dir is torn down FIRST, not just created: leaving the sibling behind made the +# "absent" assertion below pass only on the first run of the day and fail on every rerun. +import shutil # noqa: E402 + +shutil.rmtree("/tmp/pf-test-native", ignore_errors=True) tmp = Path("/tmp/pf-test-native/bin") tmp.mkdir(parents=True, exist_ok=True) (tmp / "punktfunk-client").write_text("")