-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove requirement that suite definition file names begin with "suite_" #569
Changes from all commits
c3b65b1
adf3cc0
552b1dc
f8fd26e
3a9c061
8821d64
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -691,11 +691,16 @@ def parse(self, make_call_tree=False): | |
suite_xml = tree.getroot() | ||
self._name = suite_xml.get('name') | ||
# Validate name of suite in XML tag against filename; could be moved to common.py | ||
if not (os.path.basename(self._sdf_name) == 'suite_{}.xml'.format(self._name)): | ||
logging.critical("Invalid suite name {0} in suite definition file {1}.".format( | ||
self._name, self._sdf_name)) | ||
success = False | ||
return success | ||
if not (os.path.basename(self._sdf_name) == '{}.xml'.format(self._name)): | ||
if (os.path.basename(self._sdf_name) == 'suite_{}.xml'.format(self._name)): | ||
logging.debug("Parsing suite using legacy naming convention") | ||
logging.debug(f"Filename {os.path.basename(self._sdf_name)}") | ||
logging.debug(f"Suite name {format(self._name)}") | ||
else: | ||
logging.critical("Invalid suite name {0} in suite definition file {1}.".format( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it invalid or just not found? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This check is for inconsistency between the SDF filename and the If you think this error message is too unclear I could update it to be more precise, since it's really about inconsistency and not necessarily "validity". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I misunderstood what you were checking, I now think the message is okay. Thanks for the explanation. |
||
self._name, self._sdf_name)) | ||
success = False | ||
return success | ||
|
||
# Check if suite name is too long | ||
if len(self._name) > SUITE_NAME_MAX_CHARS: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, should this be warning? Or leave it as debug if it throws a warning in the first place anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my thinking: I wanted a message here, but since it's already mentioned in a higher-priority message earlier I figured debug-level was appropriate here.