gportalsupport: Force use /usr/bin/snapctl to get snap connection status

Do not search in path for snapctl to avoid it to be potentially
overridden by changing the PATH env variable.

Still allow testing by using an ifdef to check if we're building for the
test files or not.
This commit is contained in:
Marco Trevisan (Treviño)
2022-11-24 05:54:07 +01:00
parent 94ebd9f041
commit e6eebfd9c3
2 changed files with 13 additions and 2 deletions

View File

@@ -229,6 +229,7 @@ if host_machine.system() != 'windows'
'live-g-file' : {},
'portal-support-none' : {
'extra_sources': ['../gportalsupport.c', '../gsandbox.c'],
'c_args': ['-DG_PORTAL_SUPPORT_TEST'],
'suite': ['portal-support'],
},
'portal-support-env-var' : {
@@ -237,10 +238,12 @@ if host_machine.system() != 'windows'
},
'portal-support-snap' : {
'extra_sources': ['../gportalsupport.c', '../gsandbox.c', 'portal-support-utils.c'],
'c_args': ['-DG_PORTAL_SUPPORT_TEST'],
'suite': ['portal-support'],
},
'portal-support-snap-classic' : {
'extra_sources': ['../gportalsupport.c', '../gsandbox.c', 'portal-support-utils.c'],
'c_args': ['-DG_PORTAL_SUPPORT_TEST'],
'suite': ['portal-support'],
},
'resolver-parsing' : {'dependencies' : [network_libs]},