mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
validate:launcher: Use gst-integration-testsuites subproject as default testsuite repo if avalaible
This commit is contained in:
parent
99eaad17e2
commit
3d5099ee41
5 changed files with 30 additions and 17 deletions
|
@ -1486,7 +1486,7 @@ class _TestsLauncher(Loggable):
|
||||||
def _load_testsuites(self):
|
def _load_testsuites(self):
|
||||||
testsuites = set()
|
testsuites = set()
|
||||||
for testsuite in self.options.testsuites:
|
for testsuite in self.options.testsuites:
|
||||||
if os.path.exists(testsuite):
|
if testsuite.endswith('.py') and os.path.exists(testsuite):
|
||||||
testsuite = os.path.abspath(os.path.expanduser(testsuite))
|
testsuite = os.path.abspath(os.path.expanduser(testsuite))
|
||||||
loaded_module = self._load_testsuite([testsuite])
|
loaded_module = self._load_testsuite([testsuite])
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -20,4 +20,5 @@
|
||||||
LIBDIR = r'@LIBDIR@'
|
LIBDIR = r'@LIBDIR@'
|
||||||
DATADIR = r'@DATADIR@'
|
DATADIR = r'@DATADIR@'
|
||||||
BUILDDIR = r'@BUILDDIR@'
|
BUILDDIR = r'@BUILDDIR@'
|
||||||
|
SRCDIR = r'@SRCDIR@'
|
||||||
GST_VALIDATE_TESTSUITE_VERSION = '@GST_VALIDATE_TESTSUITE_VERSION@'
|
GST_VALIDATE_TESTSUITE_VERSION = '@GST_VALIDATE_TESTSUITE_VERSION@'
|
||||||
|
|
|
@ -141,8 +141,6 @@ if "--help" not in sys.argv:
|
||||||
QA_ASSETS = "gst-integration-testsuites"
|
QA_ASSETS = "gst-integration-testsuites"
|
||||||
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/gst-integration-testsuites.git"
|
||||||
DEFAULT_TESTSUITES_DIRS = [os.path.join(
|
|
||||||
DEFAULT_MAIN_DIR, QA_ASSETS, "testsuites")]
|
|
||||||
|
|
||||||
|
|
||||||
def download_assets(options):
|
def download_assets(options):
|
||||||
|
@ -210,7 +208,7 @@ class LauncherConfig(Loggable):
|
||||||
# paths passed with --media-path, and not defined by a testsuite
|
# paths passed with --media-path, and not defined by a testsuite
|
||||||
self.user_paths = []
|
self.user_paths = []
|
||||||
self.paths = []
|
self.paths = []
|
||||||
self.testsuites_dirs = DEFAULT_TESTSUITES_DIRS
|
self.testsuites_dirs = utils.DEFAULT_TESTSUITES_DIRS
|
||||||
|
|
||||||
self.clone_dir = None
|
self.clone_dir = None
|
||||||
|
|
||||||
|
@ -286,7 +284,10 @@ class LauncherConfig(Loggable):
|
||||||
if self.no_color:
|
if self.no_color:
|
||||||
utils.desactivate_colors()
|
utils.desactivate_colors()
|
||||||
if self.clone_dir is None:
|
if self.clone_dir is None:
|
||||||
|
if not utils.USING_SUBPROJECT:
|
||||||
self.clone_dir = os.path.join(self.main_dir, QA_ASSETS)
|
self.clone_dir = os.path.join(self.main_dir, QA_ASSETS)
|
||||||
|
else:
|
||||||
|
self.clone_dir = self.main_dir
|
||||||
|
|
||||||
if not isinstance(self.paths, list):
|
if not isinstance(self.paths, list):
|
||||||
self.paths = [self.paths]
|
self.paths = [self.paths]
|
||||||
|
@ -299,6 +300,7 @@ class LauncherConfig(Loggable):
|
||||||
if self.generate_info_full is True:
|
if self.generate_info_full is True:
|
||||||
self.generate_info = True
|
self.generate_info = True
|
||||||
|
|
||||||
|
if not utils.USING_SUBPROJECT:
|
||||||
if self.sync_all is True or self.force_sync is True:
|
if self.sync_all is True or self.force_sync is True:
|
||||||
self.sync = True
|
self.sync = True
|
||||||
|
|
||||||
|
@ -481,7 +483,7 @@ class LauncherConfig(Loggable):
|
||||||
" Default is %s" % DEFAULT_MAIN_DIR)
|
" Default is %s" % DEFAULT_MAIN_DIR)
|
||||||
dir_group.add_argument("--testsuites-dir", dest="testsuites_dirs", action='append',
|
dir_group.add_argument("--testsuites-dir", dest="testsuites_dirs", action='append',
|
||||||
help="Directory where to look for testsuites. Default is %s"
|
help="Directory where to look for testsuites. Default is %s"
|
||||||
% DEFAULT_TESTSUITES_DIRS)
|
% utils.DEFAULT_TESTSUITES_DIRS)
|
||||||
dir_group.add_argument("-o", "--output-dir", dest="output_dir",
|
dir_group.add_argument("-o", "--output-dir", dest="output_dir",
|
||||||
help="Directory where to store logs and rendered files. Default is MAIN_DIR")
|
help="Directory where to store logs and rendered files. Default is MAIN_DIR")
|
||||||
dir_group.add_argument("-l", "--logs-dir", dest="logsdir",
|
dir_group.add_argument("-l", "--logs-dir", dest="logsdir",
|
||||||
|
@ -579,7 +581,7 @@ def main(libsdir):
|
||||||
global LIBSDIR
|
global LIBSDIR
|
||||||
LIBSDIR = libsdir
|
LIBSDIR = libsdir
|
||||||
|
|
||||||
DEFAULT_TESTSUITES_DIRS.append(os.path.join(LIBSDIR, "testsuites"))
|
utils.DEFAULT_TESTSUITES_DIRS.append(os.path.join(LIBSDIR, "testsuites"))
|
||||||
os.environ["GST_VALIDATE_APPS_DIR"] = os.path.join(
|
os.environ["GST_VALIDATE_APPS_DIR"] = os.path.join(
|
||||||
LIBSDIR, "apps") + os.pathsep + os.environ.get("GST_VALIDATE_APPS_DIR", "")
|
LIBSDIR, "apps") + os.pathsep + os.environ.get("GST_VALIDATE_APPS_DIR", "")
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ _launcherdir = get_option('libdir') + '/gst-validate-launcher/python/launcher/'
|
||||||
launcher_configure = configuration_data()
|
launcher_configure = configuration_data()
|
||||||
launcher_configure.set('GST_VALIDATE_TESTSUITE_VERSION', '@0@'.format(TESTSUITE_VERSION))
|
launcher_configure.set('GST_VALIDATE_TESTSUITE_VERSION', '@0@'.format(TESTSUITE_VERSION))
|
||||||
launcher_configure.set('BUILDDIR', meson.build_root())
|
launcher_configure.set('BUILDDIR', meson.build_root())
|
||||||
|
launcher_configure.set('SRCDIR', meson.source_root())
|
||||||
launcher_configure.set('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
|
launcher_configure.set('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
|
||||||
launcher_configure.set('LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
|
launcher_configure.set('LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,18 @@ from xml.etree import ElementTree
|
||||||
|
|
||||||
GST_SECOND = int(1000000000)
|
GST_SECOND = int(1000000000)
|
||||||
DEFAULT_TIMEOUT = 30
|
DEFAULT_TIMEOUT = 30
|
||||||
DEFAULT_MAIN_DIR = os.environ.get('GST_VALIDATE_LAUNCHER_MAIN_DIR', os.path.join(os.path.expanduser("~"), "gst-validate"))
|
|
||||||
DEFAULT_GST_QA_ASSETS = os.path.join(
|
DEFAULT_MAIN_DIR = os.path.join(config.BUILDDIR, "subprojects", "gst-integration-testsuites")
|
||||||
DEFAULT_MAIN_DIR, "gst-integration-testsuites")
|
DEFAULT_GST_QA_ASSETS = os.path.join(config.SRCDIR, "subprojects", "gst-integration-testsuites")
|
||||||
|
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_MAIN_DIR = os.environ.get('GST_VALIDATE_LAUNCHER_MAIN_DIR', DEFAULT_MAIN_DIR)
|
||||||
|
DEFAULT_TESTSUITES_DIRS = [os.path.join(DEFAULT_GST_QA_ASSETS, "testsuites")]
|
||||||
|
|
||||||
|
|
||||||
DISCOVERER_COMMAND = "gst-discoverer-1.0"
|
DISCOVERER_COMMAND = "gst-discoverer-1.0"
|
||||||
# Use to set the duration from which a test is considered as being 'long'
|
# Use to set the duration from which a test is considered as being 'long'
|
||||||
LONG_TEST = 40
|
LONG_TEST = 40
|
||||||
|
|
Loading…
Reference in a new issue