]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
misc: Use job id and make short path for testdir
authorSam Lang <sam.lang@inktank.com>
Thu, 11 Apr 2013 14:23:10 +0000 (09:23 -0500)
committerSam Lang <sam.lang@inktank.com>
Wed, 17 Apr 2013 15:24:16 +0000 (10:24 -0500)
commit72cbf1157acb31bef95d2161a1cbca66897d3cac
tree17388cb1bfef1057db4bbeb69213333ccf526dcf
parente8aa0d8bb85687831d55aa330293906b69295568
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