aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-03-15 13:52:34 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2022-03-22 15:15:29 +0200
commit6c5a0f833238bd7d330dfcb8ca704077acb7861a (patch)
treee0a8973f30933cd8be8596b4ffdc80ed13ebaf6b
parent9ee0de427ca9f7876ee3bdbc338c1a4f40a7b0d7 (diff)
downloadmeson-6c5a0f833238bd7d330dfcb8ca704077acb7861a.zip
meson-6c5a0f833238bd7d330dfcb8ca704077acb7861a.tar.gz
meson-6c5a0f833238bd7d330dfcb8ca704077acb7861a.tar.bz2
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.
-rw-r--r--unittests/helpers.py3
1 files changed, 3 insertions, 0 deletions
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: