Allow meson to skip the test that requires root if root is unavailable

This commit is contained in:
Ignacio Vazquez-Abrams
2017-12-03 00:03:40 -05:00
committed by Peter Hutterer
parent 0f5beb619e
commit 573d3d399e

View File

@@ -612,7 +612,8 @@ def parse(input_string):
def main(argv):
if not os.geteuid() == 0:
sys.exit('Script must be run as root')
print('Script must be run as root', file=sys.stderr)
sys.exit(77)
os.environ['RATBAG_TEST'] = '1'
resource.setrlimit(resource.RLIMIT_CORE, (0, 0))