from teuthology import safepath
from teuthology import lockstatus
from .orchestra import run
+from .config import config
log = logging.getLogger(__name__)
is_arm = lambda x: x.startswith('tala') or x.startswith('ubuntu@tala') or x.startswith('saya') or x.startswith('ubuntu@saya')
+
def get_testdir(ctx):
if 'test_path' in ctx.teuthology_config:
return ctx.teuthology_config['test_path']
# this on the server side, it won't work properly.
return ctx.teuthology_config.get('test_path', '/home/%s/cephtest' % test_user)
+
def get_test_user(ctx):
"""
:returns: str -- the user to run tests as on remote hosts
test_dir = get_testdir(ctx)
return os.path.normpath(os.path.join(test_dir, 'archive'))
+
+def get_http_log_path(archive_dir, job_id):
+ http_base = config.archive_server
+ if not http_base:
+ return None
+ archive_subdir = os.path.split(archive_dir)[-1]
+ return os.path.join(http_base, archive_subdir, str(job_id), '')
+
+
def get_ceph_binary_url(package=None,
branch=None, tag=None, sha1=None, dist=None,
flavor=None, format=None, arch=None):
generate_coverage(args)
-def get_http_log_path(archive_dir, job_id):
- http_base = config.archive_server
- if not http_base:
- return None
- archive_subdir = os.path.split(archive_dir)[-1]
- return os.path.join(http_base, archive_subdir, str(job_id), '')
-
-
def get_jobs(archive_dir):
dir_contents = os.listdir(archive_dir)
time=int(summary.get('duration')),
)
else:
- log = get_http_log_path(archive_dir, job)
+ log = teuthology.get_http_log_path(archive_dir, job)
if log:
log_line = email_templates['fail_log_templ'].format(log=log)
else:
body = email_templates['body_templ'].format(
name=name,
- log_root=get_http_log_path(archive_dir, ''),
+ log_root=teuthology.get_http_log_path(archive_dir, ''),
fail_count=len(failed),
hung_count=len(hung),
pass_count=len(passed),