if not os.path.exists(source_dir):
repositories = ["casaviewer","casampi", "casaplotms", "almatasks", "casa6"]
# All of the repositositories have their tests in different directories
def get_repo_test_paths(x):
"casa6": ["/casa6/casatests/regression/","/casa6/casatests/stakeholder/","/casa6/casatasks/tests/","/casa6/casatools/tests/"],
"casampi": ["/casampi/src/casampi/tests"],
"casaplotms": ["/casaplotms/tests/plotms"],
"casaviewer": ["/casaviewer/tests/tasks"]
# Clone the repository and checkout branch
for repo in repositories:
cmd = ("git clone " + repo_path + repo).split()
r.runshell(cmd, default_timeout, source_dir)
cmd = ("git checkout " + branch).split()