]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
misc: Use job id and make short path for testdir 9/head
authorSam Lang <sam.lang@inktank.com>
Thu, 11 Apr 2013 14:23:10 +0000 (09:23 -0500)
committerSam Lang <sam.lang@inktank.com>
Thu, 11 Apr 2013 18:53:38 +0000 (13:53 -0500)
commitfa2049ffbbac67df7173cbb9098346d20267aaf9
treef9432dd8ba2c35ce81e88601ba1a5ab586b200b2
parente2938f402606e86f19d64647982d1bebae00428a
misc: Use job id and make short path for testdir

Nightlies run on teuthology currently use a testdir of
/home/ubuntu/cephtest, but this causes stale job errors occasionally
from the previous tests not getting properly cleaned up, which prevents
the nightlies from running successfully.

The misc.py get_testdir() function can specify a testdir that is
specific to the job, but previously the path was too long and would
cause separate job failures.

This patch does two things to resolve that.  First, it uses the job id
from the teuthology run if one exists.  This should be a relatively
short number that will identify the job run effectively.  Second,
if the job id isn't available, it creates a shortened form of the
job's name, for example the job name:

teuthology-2013-04-09_23:51:49-rgw-next-testing-basic

becomes:

te1304092351rntb

Signed-off-by: Sam Lang <sam.lang@inktank.com>
teuthology/misc.py