set tmp $env(AUTOPKGTEST_ARTIACTS)
}]} {} elseif {![catch {
set tmp $env(AUTOPKGTEST_TMP)
-}]} {} elseif {[regsub {^([sm]test)/t-} $argv0 {\1/d-} tmp]} {
+}]} {} elseif {[regsub {^(?:\./)?([sm]test)/t-} $argv0 {\1/d-} tmp]} {
set tmp $builddir/$tmp
file mkdir $tmp
}