-
Notifications
You must be signed in to change notification settings - Fork 684
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
Test suite autodetect datastream. #4657
Conversation
The frequent use case is that a single datastream is built in the build directory, and one wants it to be tested by the test suite. This change add autodetection capabilities, so the --datastream option can be left out. If it is left out and there is not a single datastream in the build dir, an error is displayed instead.
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.
This is a very welcome change, I just suggest changing expectation of having one datastream in build dir.
tests/test_suite.py
Outdated
if len(datastreams) == 1: | ||
return datastreams[0] | ||
msg = ("Unable to auto-detect the datastream, " | ||
"expected to find a single one in the build dir, but") |
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.
I wouldn't say that it is expected that there is only single datastream in build dir, I have othen more than one.
tests/test_suite.py
Outdated
if not datastreams: | ||
raise RuntimeError(msg + " found none.") | ||
raise RuntimeError( | ||
msg + " found multiple ones: {0}".format(datastreams)) |
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.
If multiple DataStreams are found, the tool should recommend use of --datastream
option.
Thanks for the feedback, comments are addressed. |
raise RuntimeError( | ||
msg + " found multiple ones: {0}".format(datastreams)) | ||
msg + " there are {0} of them. Use the --datastream option to select " |
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.
The line can get rather long:
Setting console output to log level INFO
ERROR - Error occurred during options normalization: Autodetection of the datastream file is possible only when there is a single one in the build dir, but there are 28 of them. Use the --datastream option to select e.g. ['../build/ssg-debian8-ds.xml', '../build/ssg-rhel7-ds.xml', '../build/ssg-wrlinux8-ds.xml', '../build/ssg-wrlinux1019-ds.xml', '../build/ssg-ubuntu1404-ds.xml', '../build/ssg-ol8-ds.xml', '../build/ssg-centos6-ds.xml', '../build/ssg-fuse6-ds.xml', '../build/ssg-centos7-ds.xml', '../build/ssg-eap6-ds.xml', '../build/ssg-ubuntu1604-ds.xml', '../build/ssg-ubuntu1804-ds.xml', '../build/ssg-rhv4-ds.xml', '../build/ssg-rhosp13-ds.xml', '../build/ssg-chromium-ds.xml', '../build/ssg-fedora-ds.xml', '../build/ssg-ol7-ds.xml', '../build/ssg-sl6-ds.xml', '../build/ssg-rhel8-ds.xml', '../build/ssg-sle12-ds.xml', '../build/ssg-firefox-ds.xml', '../build/ssg-sl7-ds.xml', '../build/ssg-sle11-ds.xml', '../build/ssg-rhel6-ds.xml', '../build/ssg-opensuse-ds.xml', '../build/ssg-jre-ds.xml', '../build/ssg-ocp3-ds.xml', '../build/ssg-centos8-ds.xml']
And in the terminal it actually wraps up.
I like that they short and easy to copy-paste when adding --datastream
option.
The frequent use case is that a single datastream is built in the build directory, and one wants it to be tested by the test suite.
This change add autodetection capabilities, so the --datastream option can be left out. If it is left out and there is not a single datastream in the build dir, an error is displayed instead.
As a side-effect, the
--datastream
option won't be required any longer, which is generally recommended.