moose icon indicating copy to clipboard operation
moose copied to clipboard

Add 'output_dir' parameter to FileTester

Open joshuahansel opened this issue 2 years ago • 1 comments

Reason

Sometimes output resides in a subdirectory, with respect to the tests files, such as output/. In this case, if you specify the output file to check against a gold file, such as

[Tests]
  [mytest]
    type = CSVDiff
    csvdiff = 'output/myfile.csv'
  []
[]

then the tester looks for the gold file at gold/output/myfile.csv. It would be ideal for the gold file not to require a subdirectory: gold/myfile.csv.

Design

This would add a parameter output_dir to FileTester to specify where to look for the output file. Then a user could do

[Tests]
  [mytest]
    type = CSVDiff
    output_dir = 'output'
    csvdiff = 'myfile.csv'
  []
[]

Impact

Avoids needing strange workarounds in relevant situations.

joshuahansel avatar Oct 26 '23 18:10 joshuahansel

I've ran into a use case where this feature would be useful for me as well.

gambka avatar Jun 17 '25 22:06 gambka