summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-07-24 16:33:12 +0100
committerSimon McVittie <smcv@collabora.com>2022-07-24 16:33:12 +0100
commita4135b9652d87aecfa4b05c4525609960661968c (patch)
tree8dc5790920d8c0d159c47d2dff7dc5cbd68d5381
parente9c8070bfd2fa93833a23357523c286fb0c3cd83 (diff)
downloadglib-a4135b9652d87aecfa4b05c4525609960661968c.tar.gz
assert-msg-test.py: Look for assert-msg-test relative to this script
When run as an installed-test, assert-msg-test generally won't be in the PATH, but it will be in the same directory as the installed copy of this script, so we can find it that way. This fixes an installed-tests failure in Debian's autopkgtest environment. Signed-off-by: Simon McVittie <smcv@collabora.com>
-rwxr-xr-xglib/tests/assert-msg-test.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/glib/tests/assert-msg-test.py b/glib/tests/assert-msg-test.py
index d2c8f1451..01bedce91 100755
--- a/glib/tests/assert-msg-test.py
+++ b/glib/tests/assert-msg-test.py
@@ -64,7 +64,9 @@ class TestAssertMessage(unittest.TestCase):
os.environ["G_TEST_BUILDDIR"], "assert-msg-test"
)
else:
- self.__assert_msg_test = shutil.which("assert-msg-test")
+ self.__assert_msg_test = os.path.join(
+ os.path.dirname(__file__), "assert-msg-test"
+ )
print("assert-msg-test:", self.__assert_msg_test)
def runAssertMessage(self, *args):