Skip to content

Relative paths to --report-file can result in FileNotFoundError #2849

@mahendrapaipuri

Description

@mahendrapaipuri

When we run a simple regression test with setting --report-file on CLI as reframe --report-file=test-report.json -c ., we will end up with following error (pasting only relevant log lines):

[  PASSED  ] Ran 0/0 test case(s) from 0 check(s) (0 failure(s), 0 skipped)
[==========] Finished on Wed Apr  5 10:15:13 2023 
Run report saved in 'test-report.json'

ERROR: run session stopped: file not found error: [Errno 2] No such file or directory: ''
Log file(s) saved in '/tmp/rfm-dz27cl1s.log'

This is due to the fact that basedir here is being calculated on relative path of report_file and in the current case, basedir would be an empty string. Ensuring report_file to be an absolute path should fix the issue. This regression comes from this commit

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions