Commit 91a3a897 authored by Stéphane Cerveau's avatar Stéphane Cerveau 🤸🏻

testsuite: use sync_version if not none

Use sync_version from gst-validate-launcher
if it exists to use a custom version of the test suite

Part-of: <!92>
parent 53538524
Pipeline #240703 waiting for manual action with stages
in 2 minutes and 53 seconds
......@@ -115,11 +115,15 @@ def download_files(assets_dir):
def update_assets(options, assets_dir):
try:
if options.sync_version is not None:
sync_version = options.sync_version
else:
sync_version = GST_VALIDATE_TESTSUITE_VERSION
CHECKOUT_BRANCH_COMMAND = "git fetch origin && (git checkout origin/%s || git checkout tags/%s)" % (
GST_VALIDATE_TESTSUITE_VERSION, GST_VALIDATE_TESTSUITE_VERSION)
sync_version, sync_version)
if options.force_sync:
subprocess.check_call(["git", "reset", "--hard"], cwd=assets_dir)
print("Checking out %s" % GST_VALIDATE_TESTSUITE_VERSION)
print("Checking out %s" % sync_version)
subprocess.check_call(CHECKOUT_BRANCH_COMMAND, shell=True, cwd=assets_dir)
download_files(os.path.basename(os.path.join(assets_dir)))
except Exception as e:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment