From 71dee6c3843d02d9d41bbb353cb3fa653190018d Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 19 Mar 2014 17:03:05 +0100 Subject: [PATCH] launcher: --sync: Only update/clone git repo if specified Allows: * handling non-git-based asset directory * working offline * working without forcing updates --- validate/tools/launcher/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/validate/tools/launcher/main.py b/validate/tools/launcher/main.py index 36f668ca5d..21fa3a9106 100644 --- a/validate/tools/launcher/main.py +++ b/validate/tools/launcher/main.py @@ -123,6 +123,8 @@ def main(): assets_group.add_option("", "--remote-assets-url", dest="remote_assets_url", default=DEFAULT_GST_QA_ASSETS_REPO, help="Url to the remote assets") + assets_group.add_option("-S", "--sync", dest="sync", action="store_true", + default=False, help="Synchronize asset repository") parser.add_option_group(assets_group) loggable.init("GST_VALIDATE_LAUNCHER_DEBUG", True, False) @@ -161,7 +163,7 @@ def main(): tests_launcher.set_settings(options, args) - if options.remote_assets_url: + if options.remote_assets_url and options.sync: if os.path.exists(options.clone_dir): launch_command("cd %s && %s" % (options.clone_dir, options.update_assets_command))