From 471303c79a552bbd3765a6c47507fc2f2926a29d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 24 Feb 2017 16:43:07 +0800 Subject: [PATCH] qa/tasks/workunit: use the suite repo for cloning workunit as "workunits" reside in ceph/qa/workunits, it's more intuitive to respect suite-repo option when cloning workunits. Signed-off-by: Kefu Chai (cherry picked from commit 4cf28de4c9a60a4618d101f555f5a2e59b7ab109) --- qa/tasks/workunit.py | 61 ++++++++++++-------------------------------- 1 file changed, 17 insertions(+), 44 deletions(-) diff --git a/qa/tasks/workunit.py b/qa/tasks/workunit.py index c509d504eea01..2720363b4f98d 100644 --- a/qa/tasks/workunit.py +++ b/qa/tasks/workunit.py @@ -308,51 +308,24 @@ def _run_tests(ctx, refspec, role, tests, env, subdir=None, timeout=None): clonedir = '{tdir}/clone.{role}'.format(tdir=testdir, role=role) srcdir = '{cdir}/qa/workunits'.format(cdir=clonedir) - git_url = teuth_config.get_ceph_git_url() - try: - remote.run( - logger=log.getChild(role), - args=[ - 'rm', - '-rf', - clonedir, - run.Raw('&&'), - 'git', - 'clone', - git_url, - clonedir, - run.Raw('&&'), - 'cd', '--', clonedir, - run.Raw('&&'), - 'git', 'checkout', refspec, - ], - ) - except CommandFailedError: - alt_git_url = git_url.replace('ceph-ci', 'ceph') - log.info( - "failed to check out '%s' from %s; will also try in %s", - refspec, + git_url = teuth_config.get_ceph_qa_suite_git_url() + remote.run( + logger=log.getChild(role), + args=[ + 'rm', + '-rf', + clonedir, + run.Raw('&&'), + 'git', + 'clone', git_url, - alt_git_url, - ) - remote.run( - logger=log.getChild(role), - args=[ - 'rm', - '-rf', - clonedir, - run.Raw('&&'), - 'git', - 'clone', - alt_git_url, - clonedir, - run.Raw('&&'), - 'cd', '--', clonedir, - run.Raw('&&'), - 'git', 'checkout', refspec, - ], - ) - + clonedir, + run.Raw('&&'), + 'cd', '--', clonedir, + run.Raw('&&'), + 'git', 'checkout', refspec, + ], + ) remote.run( logger=log.getChild(role), args=[ -- 2.39.5