blob: df5a18acf786d2e062da420cd1792a8c2821e36d [file] [log] [blame]
import subprocess
import os
from tsqa.utils import run_sync_command
TMP_DIR = '/tmp/tsqa/'
def source_dir():
'''
return the directory where source code is checked out
'''
# if we don't have it, clone it
if not os.path.exists(TMP_DIR):
os.makedirs(TMP_DIR)
run_sync_command(['git', 'clone', 'https://github.com/apache/trafficserver.git'],
cwd=TMP_DIR,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
return TMP_DIR