mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
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>
This commit is contained in:
parent
4e00fdea9b
commit
3f02660ea5
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user