]> xenbits.xensource.com Git - people/royger/osstest.git/commit
TestSupport: substeps: work if steps in ad-hoc tests take >1s
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 30 May 2018 15:50:24 +0000 (16:50 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 12 Jun 2018 11:32:44 +0000 (12:32 +0100)
commit665a927bee4723f74cb2cd708c5d7d9acf068dae
tree0f5977e2a50c16eac0c8d177f1786ef7474097d7
parent79b0c33c9b330b772b3b329c5a9b7475d0049b52
TestSupport: substeps: work if steps in ad-hoc tests take >1s

When running by hand, OSSTEST_TESTID is not set.  We provide a value
with the time and the pid in it, so that rerunning the script by hand
works, even though in production this would result in multiple
identically-named substeps.

But we need to fix this value for the duration of the script.
Otherwise when it calls substep_finish, if the time has moved on, it
computes a different OSSTEST_TESTID and therefore a different substep
name, and then the substep machinery smells a rat and bombs out.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Osstest/TestSupport.pm