From 6c5a0f833238bd7d330dfcb8ca704077acb7861a Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 15 Mar 2022 13:52:34 -0700 Subject: unittests: Fix rpath tests no nixos Which insert a bunch of rpath entries we strip, but then don't check if they're empty and fail anyway. --- unittests/helpers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unittests/helpers.py b/unittests/helpers.py index 182dfa3..ac9d980 100644 --- a/unittests/helpers.py +++ b/unittests/helpers.py @@ -171,6 +171,9 @@ def get_rpath(fname: str) -> T.Optional[str]: # nix/nixos adds a bunch of stuff to the rpath out of necessity that we # don't check for, so clear those final = ':'.join([e for e in raw.split(':') if not e.startswith('/nix')]) + # If we didn't end up anything but nix paths, return None here + if not final: + return None return final def get_path_without_cmd(cmd: str, path: str) -> str: -- cgit v1.1