Add gst-integration-testsuites files as a submodule
authorThibault Saunier <tsaunier@igalia.com>
Fri, 24 Sep 2021 19:28:39 +0000 (16:28 -0300)
committerThibault Saunier <tsaunier@igalia.com>
Fri, 24 Sep 2021 19:36:50 +0000 (16:36 -0300)
.gitmodules
subprojects/gst-devtools/docs/gst-validate-launcher.md
subprojects/gst-devtools/validate/launcher/main.py
subprojects/gst-devtools/validate/launcher/utils.py
subprojects/gst-integration-testsuites/medias [new submodule]

index e69de29..9a950a1 100644 (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
index b30db15..59d655d 100644 (file)
@@ -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
index 745a774..b56ca07 100644 (file)
@@ -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, []):
index 09166bd..15f9aca 100644 (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"))
 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 (submodule)
index 0000000..398b3df
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 398b3df4efa1ee745b7f748832aca7e1b47c5133