Add gst-integration-testsuites files as a submodule

This commit is contained in:
Thibault Saunier 2021-09-24 16:28:39 -03:00
parent 098b876985
commit 776d8a6617
5 changed files with 23 additions and 7 deletions

3
.gitmodules vendored
View file

@ -0,0 +1,3 @@
[submodule "subprojects/gst-integration-testsuites/medias"]
path = subprojects/gst-integration-testsuites/medias
url = https://gitlab.freedesktop.org/gstreamer/gst-integration-testsuites.git

View file

@ -9,7 +9,7 @@ providing a set of options and features to help debugging them.
## Run the GStreamer unit tests ## Run the GStreamer unit tests
Running GStreamer unit tests inside `gst-build` is as simple as doing: Running GStreamer unit tests is as simple as doing:
``` ```
gst-validate-launcher check.gst* gst-validate-launcher check.gst*
@ -36,10 +36,11 @@ GstValidate comes with a default testsuite to be executed on a default
set of media samples. Those media samples are stored with `git-lfs` so set of media samples. Those media samples are stored with `git-lfs` so
you will need it to be able to launch the default testsuite. you will need it to be able to launch the default testsuite.
We recommend using `gst-build` to setup everything needed to run the testsuite Then you can run:
and you can simply do:
```
gst-validate-launcher validate gst-validate-launcher validate
```
This will only launch the GstValidate tests and not other applications This will only launch the GstValidate tests and not other applications
that might be supported (currently `ges-launch` is also supported and that might be supported (currently `ges-launch` is also supported and

View file

@ -27,6 +27,7 @@ import argparse
import tempfile import tempfile
from . import reporters from . import reporters
import subprocess import subprocess
import pathlib
from .loggable import Loggable from .loggable import Loggable
@ -142,9 +143,9 @@ https://developer.pitivi.org/Bug_reporting.html#debug-logs).
if "--help" not in sys.argv: if "--help" not in sys.argv:
HELP = "Use --help for the full help" HELP = "Use --help for the full help"
QA_ASSETS = "gst-integration-testsuites" QA_ASSETS = "gstreamer"
MEDIAS_FOLDER = "medias" MEDIAS_FOLDER = "medias"
DEFAULT_GST_QA_ASSETS_REPO = "https://gitlab.freedesktop.org/gstreamer/gst-integration-testsuites.git" DEFAULT_GST_QA_ASSETS_REPO = "https://gitlab.freedesktop.org/gstreamer/gstreamer.git"
def download_assets(options): def download_assets(options):
@ -626,6 +627,16 @@ def setup_launcher_from_args(args, main_options=None):
if not download_assets(options): if not download_assets(options):
return False, None, None return False, None, None
for d in options.testsuites_dirs:
path = pathlib.Path(d).resolve()
if not path.as_posix().endswith('subprojects/gst-integration-testsuites/testsuites'):
continue
# Ensure we have gst-integration-testsuites media files.
subprocess.check_call(['git', 'submodule', 'update', '--init'],
cwd=utils.DEFAULT_GST_QA_ASSETS)
subprocess.check_call(['git', 'lfs', 'pull', '--exclude='],
cwd=pathlib.Path(utils.DEFAULT_GST_QA_ASSETS) / 'medias')
# Ensure that the scenario manager singleton is ready to be used # Ensure that the scenario manager singleton is ready to be used
ScenarioManager().config = options ScenarioManager().config = options
if not tests_launcher.set_settings(options, []): if not tests_launcher.set_settings(options, []):

View file

@ -54,7 +54,7 @@ DEFAULT_GST_QA_ASSETS = os.path.join(config.SRCDIR, "subprojects", "gst-integrat
USING_SUBPROJECT = os.path.exists(os.path.join(config.BUILDDIR, "subprojects", "gst-integration-testsuites")) USING_SUBPROJECT = os.path.exists(os.path.join(config.BUILDDIR, "subprojects", "gst-integration-testsuites"))
if not USING_SUBPROJECT: if not USING_SUBPROJECT:
DEFAULT_MAIN_DIR = os.path.join(os.path.expanduser("~"), "gst-validate") DEFAULT_MAIN_DIR = os.path.join(os.path.expanduser("~"), "gst-validate")
DEFAULT_GST_QA_ASSETS = os.path.join(DEFAULT_MAIN_DIR, "gst-integration-testsuites") DEFAULT_GST_QA_ASSETS = os.path.join(DEFAULT_MAIN_DIR, "gstreamer", "subprojects", "gst-integration-testsuites")
DEFAULT_MAIN_DIR = os.environ.get('GST_VALIDATE_LAUNCHER_MAIN_DIR', DEFAULT_MAIN_DIR) DEFAULT_MAIN_DIR = os.environ.get('GST_VALIDATE_LAUNCHER_MAIN_DIR', DEFAULT_MAIN_DIR)
DEFAULT_TESTSUITES_DIRS = [os.path.join(DEFAULT_GST_QA_ASSETS, "testsuites")] DEFAULT_TESTSUITES_DIRS = [os.path.join(DEFAULT_GST_QA_ASSETS, "testsuites")]

@ -0,0 +1 @@
Subproject commit 398b3df4efa1ee745b7f748832aca7e1b47c5133