From c032474dffbfedb42f18c6429ef0744e6b5d01cf Mon Sep 17 00:00:00 2001 From: R1kaB3rN <100738684+R1kaB3rN@users.noreply.github.com> Date: Thu, 16 May 2024 18:47:49 -0700 Subject: [PATCH] umu_test: fix test --- umu/umu_test.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/umu/umu_test.py b/umu/umu_test.py index 189a4cbc3..6c37f1670 100644 --- a/umu/umu_test.py +++ b/umu/umu_test.py @@ -1286,6 +1286,14 @@ def test_game_drive_empty(self): """ args = None result_gamedrive = None + # Expected library paths for the container runtime framework + libpaths = { + "/usr/lib64", + "/usr/lib32", + "/usr/lib", + "/usr/lib/x86_64-linux-gnu", + "/usr/lib/i386-linux-gnu", + } Path(self.test_file + "/proton").touch() # Replicate main's execution and test up until enable_steam_game_drive @@ -1334,12 +1342,11 @@ def test_game_drive_empty(self): "Expected two values in STEAM_RUNTIME_LIBRARY_PATH", ) - # We need to sort the elements because the values were originally in a set - str1, str2 = [*sorted(self.env["STEAM_RUNTIME_LIBRARY_PATH"].split(":"))] - - # Check that there are no trailing colons or unexpected characters - self.assertEqual(str1, "/usr/lib", "Expected /usr/lib") - self.assertEqual(str2, "/usr/lib32", "Expected /usr/lib32") + # Check that there are no trailing colons, unexpected characters + # and is officially supported + str1, str2 = self.env["STEAM_RUNTIME_LIBRARY_PATH"].split(":") + self.assertTrue(str1 in libpaths, f"Expected a path in: {libpaths}") + self.assertTrue(str2 in libpaths, f"Expected a path in: {libpaths}") # Both of these values should be empty still after calling # enable_steam_game_drive