[th/output-base-option] add --output-base
option to pre-determine the name of the result files
#164
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, we have the "logs" configuration in the YAML config.
This defaults to "$PWD/ft-logs". The fact is that our YAML
config can contain more than one test configs ("tft-idx"). We
thus might write more than one result files and hence we allow
configuring the directory only.
But the chosen filenames contain timestamps. That is cumbersome as the
file name is no predictable from the user. The user will have to search
the output directory for files that look suitable.
Instead, add a command line option "--output-base" to "./main.py".
The user could use this like:
The benefit is that afterwards you know you can find the result files
as "${OUTPUT_BASE}*.json", and you know which tft-idx corresponds to
which file.
Note that if you provide a relative path (or just a basename without a
path separator), then the filename is relative to the current working
directory. We don't fallback to the "logs" path from the config as it
seems more expected that a command line argument is relative to the
current directory. On the other hand, you can also specify a directory
name only (by appending a trailing '/'). That has the same effect as
setting the base for the filename to "result-".