mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 22:35:35 +00:00
utils: test: use sys.executable when launching aa-notify in tests
If the tests are running under a different Python, then the aa-notify bin should use the same Python Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
This commit is contained in:
@@ -14,6 +14,7 @@ import os
|
||||
import pwd
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
import unittest
|
||||
from tempfile import NamedTemporaryFile
|
||||
@@ -604,6 +605,9 @@ if __name__ == '__main__':
|
||||
if 'APPARMOR_NOTIFY' in os.environ:
|
||||
aanotify_bin = [os.environ['APPARMOR_NOTIFY']]
|
||||
|
||||
if sys.executable:
|
||||
aanotify_bin = [sys.executable] + aanotify_bin
|
||||
|
||||
if '__AA_CONFDIR' in os.environ:
|
||||
aanotify_bin = aanotify_bin + ['--configdir', os.getenv('__AA_CONFDIR')]
|
||||
|
||||
|
Reference in New Issue
Block a user