mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-04 20:59:21 +02:00
tests/lib/testprogramrunner: Support overriding the environment
This commit is contained in:
@@ -98,7 +98,12 @@ class TestProgramRunner(unittest.TestCase):
|
|||||||
print("tmpdir:", self.tmpdir.name)
|
print("tmpdir:", self.tmpdir.name)
|
||||||
|
|
||||||
def runTestProgram(
|
def runTestProgram(
|
||||||
self, *args, should_fail=False, timeout_seconds=10, wrapper_args=[]
|
self,
|
||||||
|
*args,
|
||||||
|
should_fail=False,
|
||||||
|
timeout_seconds=10,
|
||||||
|
wrapper_args=[],
|
||||||
|
environment={},
|
||||||
) -> Result:
|
) -> Result:
|
||||||
argv = [self.__program]
|
argv = [self.__program]
|
||||||
|
|
||||||
@@ -114,6 +119,7 @@ class TestProgramRunner(unittest.TestCase):
|
|||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env["LC_ALL"] = "C.UTF-8"
|
env["LC_ALL"] = "C.UTF-8"
|
||||||
env["G_DEBUG"] = "fatal-warnings"
|
env["G_DEBUG"] = "fatal-warnings"
|
||||||
|
env.update(environment)
|
||||||
|
|
||||||
print("Running:", argv)
|
print("Running:", argv)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user