[glib: 1/6] tests: Fix hard-coded install path in glib-mkenums test
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/6] tests: Fix hard-coded install path in glib-mkenums test
- Date: Mon, 10 Jun 2019 17:32:42 +0000 (UTC)
commit 3f02660ea5e9305e3ca9814b43ca7831ec985af6
Author: Philip Withnall <withnall endlessm com>
Date: Sat Jun 8 00:09:11 2019 +0100
tests: Fix hard-coded install path in glib-mkenums test
While this was useful for local testing while developing the test, it’s
not widely applicable. Look the binary up in the current `${PATH}` if
it’s not specified using `G_TEST_BUILDDIR`.
This is needed to get the `mkenums.py` test working as an
installed-test.
Signed-off-by: Philip Withnall <withnall endlessm com>
gobject/tests/mkenums.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gobject/tests/mkenums.py b/gobject/tests/mkenums.py
index f2a1ad95c..9b4632497 100644
--- a/gobject/tests/mkenums.py
+++ b/gobject/tests/mkenums.py
@@ -22,6 +22,7 @@
import collections
import os
+import shutil
import subprocess
import tempfile
import textwrap
@@ -57,7 +58,7 @@ class TestMkenums(unittest.TestCase):
os.path.join(os.environ['G_TEST_BUILDDIR'], '..',
'glib-mkenums')
else:
- self.__mkenums = os.path.join('/', 'usr', 'bin', 'glib-mkenums')
+ self.__mkenums = shutil.which('glib-mkenums')
print('rspfile: {}, mkenums:'.format(self.rspfile), self.__mkenums)
def tearDown(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]