Subject: | Tests fail with symlinked build directory |
On one of my smokers test.pl fails:
Output from './Build test':
# Failed test at (eval 11) line 36.
07:46:55 echo aaa
aaa
07:46:56 a=aaa;echo $a
aaa
# Looks like you failed 1 test of 77.
test.pl ..
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/77 subtests
Looking with the debugger into the test process I found:
DB<4> x currentDirectory
0 '/tmpfs/.cpan-build-cpansand/2017081606/Data-Table-Text-20170815-0/'
DB<5> x startDirectory
0 '/home/cpansand/.cpan/build/2017081606/Data-Table-Text-20170815-0/'
On this system the build directory is symlinked to another directory:
$ ls -al ~cpansand/.cpan/build
lrwxrwxrwx 1 cpansand cpansand 27 May 7 2016 /home/cpansand/.cpan/build -> /tmpfs/.cpan-build-cpansand
Probably it helps if startDirectory returns the canonified path, e.g. by using Cwd::realpath().