diff options
author | Stéphane Cerveau <scerveau@collabora.com> | 2020-11-06 12:56:12 +0100 |
---|---|---|
committer | Stéphane Cerveau <scerveau@collabora.com> | 2020-11-06 12:56:12 +0100 |
commit | 91a3a897ddfdcddbc2e8970b0623cb85b2f1c512 (patch) | |
tree | b2dc1235ee10003c3bc3bd8258fd3acff883640c | |
parent | 53538524f35fa55f22b1761f1cfc410faff006a3 (diff) |
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: <https://gitlab.freedesktop.org/gstreamer/gst-integration-testsuites/-/merge_requests/92>
-rw-r--r-- | testsuites/testsuiteutils.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/testsuites/testsuiteutils.py b/testsuites/testsuiteutils.py index 8c6c275..44cfb63 100644 --- a/testsuites/testsuiteutils.py +++ b/testsuites/testsuiteutils.py @@ -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: |