avocado-framework/avocado — pull request #167 by ruda (2014-08-27 20:16:33+00:00)
Title: avocado.test: Use job.unique_id to build temporary path.

if job.unique_id is available in test, use this information to build the temporary path used in attribute workdir. The template format is `$TMP/job--`.

Here's an example:

$ ./scripts/avocado run tests/synctest.py tests/sleeptest.py --keep-tmp-files
...
$ find /var/tmp/avocado
/var/tmp/avocado
/var/tmp/avocado/job-d7c3acdcabc184990dfa90b69c313a19e12c2c31-gmwbDg
/var/tmp/avocado/job-d7c3acdcabc184990dfa90b69c313a19e12c2c31-gmwbDg/synctest.py
/var/tmp/avocado/job-d7c3acdcabc184990dfa90b69c313a19e12c2c31-gmwbDg/synctest.py/src
/var/tmp/avocado/job-d7c3acdcabc184990dfa90b69c313a19e12c2c31-gmwbDg/synctest.py/src/synctest
/var/tmp/avocado/job-d7c3acdcabc184990dfa90b69c313a19e12c2c31-gmwbDg/synctest.py/src/synctest/synctest
/var/tmp/avocado/job-d7c3acdcabc184990dfa90b69c313a19e12c2c31-gmwbDg/synctest.py/src/synctest/synctest.c
/var/tmp/avocado/job-d7c3acdcabc184990dfa90b69c313a19e12c2c31-gmwbDg/synctest.py/src/synctest/Makefile
/var/tmp/avocado/job-d7c3acdcabc184990dfa90b69c313a19e12c2c31-tZG3kV
/var/tmp/avocado/job-d7c3acdcabc184990dfa90b69c313a19e12c2c31-tZG3kV/sleeptest.py
/var/tmp/avocado/job-d7c3acdcabc184990dfa90b69c313a19e12c2c31-tZG3kV/sleeptest.py/src

Signed-off-by: Ruda Moura