mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
launcher: Now using git annex to handle media files
This commit is contained in:
parent
676602644c
commit
28bd6ee17a
3 changed files with 13 additions and 6 deletions
|
@ -612,7 +612,6 @@ class _TestsLauncher(Loggable):
|
||||||
total_num_tests = 0
|
total_num_tests = 0
|
||||||
for tester in self.testers:
|
for tester in self.testers:
|
||||||
total_num_tests += len(tester.list_tests())
|
total_num_tests += len(tester.list_tests())
|
||||||
print total_num_tests
|
|
||||||
|
|
||||||
for tester in self.testers:
|
for tester in self.testers:
|
||||||
res = tester.run_tests(cur_test_num, total_num_tests)
|
res = tester.run_tests(cur_test_num, total_num_tests)
|
||||||
|
|
|
@ -107,7 +107,8 @@ def main():
|
||||||
|
|
||||||
assets_group = OptionGroup(parser, "Handle remote assets")
|
assets_group = OptionGroup(parser, "Handle remote assets")
|
||||||
assets_group.add_option("-u", "--update-assets-command", dest="update_assets_command",
|
assets_group.add_option("-u", "--update-assets-command", dest="update_assets_command",
|
||||||
default="git pull --rebase",
|
default="git fetch %s && git checkout FETCH_HEAD && git annex get ."
|
||||||
|
% (DEFAULT_GST_QA_ASSETS_REPO, ),
|
||||||
help="Command to update assets")
|
help="Command to update assets")
|
||||||
assets_group.add_option("", "--get-assets-command", dest="get_assets_command",
|
assets_group.add_option("", "--get-assets-command", dest="get_assets_command",
|
||||||
default="git clone",
|
default="git clone",
|
||||||
|
@ -178,11 +179,16 @@ def main():
|
||||||
if options.remote_assets_url and options.sync:
|
if options.remote_assets_url and options.sync:
|
||||||
if os.path.exists(options.clone_dir):
|
if os.path.exists(options.clone_dir):
|
||||||
launch_command("cd %s && %s" % (options.clone_dir,
|
launch_command("cd %s && %s" % (options.clone_dir,
|
||||||
options.update_assets_command))
|
options.update_assets_command),
|
||||||
|
fails=True)
|
||||||
else:
|
else:
|
||||||
launch_command("%s %s %s" % (options.get_assets_command,
|
launch_command("%s %s %s" % (options.get_assets_command,
|
||||||
options.remote_assets_url,
|
options.remote_assets_url,
|
||||||
options.clone_dir))
|
options.clone_dir),
|
||||||
|
fails=True)
|
||||||
|
launch_command("cd %s && %s" % (options.clone_dir,
|
||||||
|
options.update_assets_command),
|
||||||
|
fails=True)
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
@ -123,9 +123,11 @@ def printc(message, color="", title=False):
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
|
||||||
def launch_command(command, color=None):
|
def launch_command(command, color=None, fails=False):
|
||||||
printc(command, Colors.OKGREEN, True)
|
printc(command, Colors.OKGREEN, True)
|
||||||
os.system(command)
|
res = os.system(command)
|
||||||
|
if res != 0 and fails is True:
|
||||||
|
raise subprocess.CalledProcessError(res, "%s failed" % command)
|
||||||
|
|
||||||
|
|
||||||
def path2url(path):
|
def path2url(path):
|
||||||
|
|
Loading…
Reference in a new issue