autoinst-log.txt opened with wrong path
|Target version:||Current Sprint|
austoinst-log.txt is currently opened as though it was in
. but really it is in
open(my $AUTOINSTLOG, "<", "autoinst-log.txt") || die('Could not open autoinst-log.txt for reading');
which is meant to open the log file created in bmwqemu.pm
$logger = Mojo::Log->new(level => 'debug', path => catfile(result_dir, 'autoinst-log.txt'));
but as far as I can tell there is no chdir into result_dir anywhere, so the CWD at the time of the open() is still the same CWD as it was when the logger was initialized, and that is one directory above autoinst-log.txt. Printing getcwd just before the open call confirms as much.
Current master now always trip over the incorrect open call and die.
- Category set to Concrete Bugs
- Target version set to Current Sprint
Well, the regular case is not calling the Mojo::Log statement - the worker runs isotovideo -d and channels the output itself to ./autoinst.log.txt - so the open is correct.
So you only notice the problem if calling isotovideo yourself without -d, so the Mojo::Log statement needs to remove the catfile, easy fix
- Status changed from In Progress to Feedback
PR https://github.com/os-autoinst/os-autoinst/pull/1159 takes care of this issue as well now.