Repurposed -OO for all sim run outputs including S_sie.resource being saved in the specified directory. (#1714)

* Repurposed -OO so all sim run outputs including S_sie.resource are saved to the specified folder. The files are placed in the sub-dir either RUN_xxx or DP_Product of the specified folder.

* Updated for repurposed -OO.

* Added quoting code markdown for such as in order to show <name> as is.

* Added quoting code for missing items.

* Updated to raise an error when the --read-only-sim flag is used without the -O or -OO. Also made updates to the related document accordingly.

* Fixed the error message to be more clear.
This commit is contained in:
Hong Chen
2024-07-16 10:31:52 -05:00
committed by GitHub
parent bc44a652b9
commit f666708374
5 changed files with 79 additions and 30 deletions

View File

@ -713,6 +713,11 @@ int Trick::FrameLog::create_DP_files() {
int Trick::FrameLog::create_DP_Product_dir() {
int ret=0;
DP_dir = "DP_Product";
if (std::string(command_line_args_get_user_output_dir()) != std::string(command_line_args_get_output_dir())) {
if (!std::string(command_line_args_get_user_output_dir()).empty()) {
DP_dir = std::string(command_line_args_get_user_output_dir()) + "/DP_Product";
}
}
ret = mkdir(DP_dir.c_str(), 0777);
if (ret == -1) {
if (errno == EEXIST) {