mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-23 08:00:04 +01:00
tests/lib/testprogramrunner: Support overriding the environment
This commit is contained in:
parent
044e77a384
commit
fe25e4aad5
@ -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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user