validate:launcher: Avoid spamming terminal when inspecting unit tests

And redirect GStreamer logs when necessary

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1130>
This commit is contained in:
Thibault Saunier 2021-10-13 00:06:34 -03:00 committed by GStreamer Marge Bot
parent 34d05cd876
commit fbee6c8b23

View file

@ -26,6 +26,7 @@ import platform
import shutil import shutil
import subprocess import subprocess
import threading import threading
from pathlib import Path
import concurrent.futures as conc import concurrent.futures as conc
@ -267,7 +268,9 @@ class MesonTestsManager(TestsManager):
if binary != sys.argv[0]: if binary != sys.argv[0]:
return sublauncher_tests return sublauncher_tests
os.environ["GST_DEBUG_FILE"] = str(Path(self.options.logsdir) / f"{test['name']}.discover.gstlog")
res, _, tests_launcher = setup_launcher_from_args(cmd[1:], main_options=self.options) res, _, tests_launcher = setup_launcher_from_args(cmd[1:], main_options=self.options)
del os.environ["GST_DEBUG_FILE"]
if res is False: if res is False:
return sublauncher_tests return sublauncher_tests