summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2021-09-24 16:28:39 -0300
committerThibault Saunier <tsaunier@igalia.com>2021-09-24 16:36:50 -0300
commit776d8a661720b05861ab797cca01ef37fdaf6b78 (patch)
treedcccbb61d7f75cb536f3a74e565b756a65cf93b0
parent098b876985170da763cd2350d39631b00639132c (diff)
downloadgstreamer-776d8a661720b05861ab797cca01ef37fdaf6b78.tar.gz
Add gst-integration-testsuites files as a submodule
-rw-r--r--.gitmodules3
-rw-r--r--subprojects/gst-devtools/docs/gst-validate-launcher.md9
-rw-r--r--subprojects/gst-devtools/validate/launcher/main.py15
-rw-r--r--subprojects/gst-devtools/validate/launcher/utils.py2
m---------subprojects/gst-integration-testsuites/medias0
5 files changed, 22 insertions, 7 deletions
diff --git a/.gitmodules b/.gitmodules
index e69de29bb2..9a950a1ed7 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -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
diff --git a/subprojects/gst-devtools/docs/gst-validate-launcher.md b/subprojects/gst-devtools/docs/gst-validate-launcher.md
index b30db1558c..59d655d49e 100644
--- a/subprojects/gst-devtools/docs/gst-validate-launcher.md
+++ b/subprojects/gst-devtools/docs/gst-validate-launcher.md
@@ -9,7 +9,7 @@ providing a set of options and features to help debugging them.
## 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*
@@ -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
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
-and you can simply do:
+Then you can run:
- gst-validate-launcher validate
+```
+gst-validate-launcher validate
+```
This will only launch the GstValidate tests and not other applications
that might be supported (currently `ges-launch` is also supported and
diff --git a/subprojects/gst-devtools/validate/launcher/main.py b/subprojects/gst-devtools/validate/launcher/main.py
index 745a7740d1..b56ca07815 100644
--- a/subprojects/gst-devtools/validate/launcher/main.py
+++ b/subprojects/gst-devtools/validate/launcher/main.py
@@ -27,6 +27,7 @@ import argparse
import tempfile
from . import reporters
import subprocess
+import pathlib
from .loggable import Loggable
@@ -142,9 +143,9 @@ https://developer.pitivi.org/Bug_reporting.html#debug-logs).
if "--help" not in sys.argv:
HELP = "Use --help for the full help"
-QA_ASSETS = "gst-integration-testsuites"
+QA_ASSETS = "gstreamer"
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):
@@ -626,6 +627,16 @@ def setup_launcher_from_args(args, main_options=None):
if not download_assets(options):
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
ScenarioManager().config = options
if not tests_launcher.set_settings(options, []):
diff --git a/subprojects/gst-devtools/validate/launcher/utils.py b/subprojects/gst-devtools/validate/launcher/utils.py
index 09166bd5b9..15f9acad42 100644
--- a/subprojects/gst-devtools/validate/launcher/utils.py
+++ b/subprojects/gst-devtools/validate/launcher/utils.py
@@ -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"))
if not USING_SUBPROJECT:
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_TESTSUITES_DIRS = [os.path.join(DEFAULT_GST_QA_ASSETS, "testsuites")]
diff --git a/subprojects/gst-integration-testsuites/medias b/subprojects/gst-integration-testsuites/medias
new file mode 160000
+Subproject 398b3df4efa1ee745b7f748832aca7e1b47c513