RAVEN is a flexible and multi-purpose probabilistic risk analysis, validation and uncertainty quantification, parameter optimization, model reduction and data knowledge-discovering framework.
run_tests does not correctly process command line arguments with spaces that need to be forwarded to rook. Such multi-word arguments are contained in double quotes (e.g., ./run_tests --arg-for-rook="content to be passed to rook". When placed in a string variable (ROOK_COMMAND) that is called as a command, these quotation marks are lost instead of transferred to the rook command called. This yields python rook/main.py --arg-for-rook=content to be passed to rook. rook/main.py then tries to parse its arguments and fails because it does not recognize to, be, etc. as known command line arguments.
This causes problems in the PluginAPI section as well as in the Plugins section, since in these two sections the rook command is placed in a string variable.
Steps to Reproduce
Call run_tests with a command line argument that has spaces and is not recognized by run_tests. A relatively simple, practical example is shown in the screenshot below.
Expected Behavior
run_tests should forward the multi-word argument to rook while preserving the quotation marks. To use the example above, rook should be called with python rook/main.py --arg-for-rook="content to be passed to rook". In the screenshot below, code coverage should be run on the tests to which the input refers.
Screenshots and Input Files
OS
MacOS
OS Version
No response
Dependency Manager
CONDA
For Change Control Board: Issue Review
[x] Is it tagged with a type: defect or task?
[x] Is it tagged with a priority: critical, normal or minor?
[x] If it will impact requirements or requirements tests, is it tagged with requirements?
[x] If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
[x] Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)
For Change Control Board: Issue Closure
[x] If the issue is a defect, is the defect fixed?
[x] If the issue is a defect, is the defect tested for in the regression test system? (If not explain why not.)
[x] If the issue can impact users, has an email to the users group been written (the email should specify if the defect impacts stable or master)?
[x] If the issue is a defect, does it impact the latest release branch? If yes, is there any issue tagged with release (create if needed)?
[x] If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?
Thank you for the defect report
RAVEN
.Defect Description
run_tests
does not correctly process command line arguments with spaces that need to be forwarded to rook. Such multi-word arguments are contained in double quotes (e.g.,./run_tests --arg-for-rook="content to be passed to rook"
. When placed in a string variable (ROOK_COMMAND
) that is called as a command, these quotation marks are lost instead of transferred to the rook command called. This yieldspython rook/main.py --arg-for-rook=content to be passed to rook
.rook/main.py
then tries to parse its arguments and fails because it does not recognizeto
,be
, etc. as known command line arguments.This causes problems in the PluginAPI section as well as in the Plugins section, since in these two sections the rook command is placed in a string variable.
Steps to Reproduce
Call
run_tests
with a command line argument that has spaces and is not recognized byrun_tests
. A relatively simple, practical example is shown in the screenshot below.Expected Behavior
run_tests
should forward the multi-word argument to rook while preserving the quotation marks. To use the example above, rook should be called withpython rook/main.py --arg-for-rook="content to be passed to rook"
. In the screenshot below, code coverage should be run on the tests to which the input refers.Screenshots and Input Files
OS
MacOS
OS Version
No response
Dependency Manager
CONDA
For Change Control Board: Issue Review
For Change Control Board: Issue Closure