-
Notifications
You must be signed in to change notification settings - Fork 738
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
Allow tests targets selection #1300
Conversation
@AdamBrousseau please review |
def set_test_targets() { | ||
TESTS_TARGETS = params.TESTS_TARGETS | ||
if ((TESTS_TARGETS == null) || (TESTS_TARGETS == '')) { | ||
// set default TESTS_TARGETS for pipeline job (run all tests) |
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.
presume by looking at default value, that parameter accepts a comma-separated list of test targets, any restrictions?
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.
Yes, it is restricted to _sanity and _extended for now.
We'll add a generic pipeline to be able to run any tests.
d94e1df
to
917884e
Compare
a2a8fbc
to
b8dab44
Compare
@AdamBrousseau ready for review |
TEST_JOB_NAME = "Test-Extended-JDK${SDK_VERSION}-${SPEC}" | ||
break | ||
default: | ||
echo "error: Unknown test target: ${level}" |
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.
Currently, it will not work to pass other targets to internal builds because of this default: handling.
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.
Correct (throws an error).
In order to work with other targets we need Jenkins job[s] and pipeline/groovy scripts that are not available at this moment. As agreed today, we will discuss and address this at a later time (and another PR).
65f2ff4
to
bf8e7e8
Compare
*/ | ||
def set_test_targets() { | ||
TESTS_TARGETS = params.TESTS_TARGETS | ||
if (!TESTS_TARGETS) { |
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.
TEST_TARGETS
will either be null
(no param defined), blank (param defined but no value), or will have a value. I would like to see a test case for each to prove this if
condition works as expected.
It is different than how we do it in variables-functions.
Especially since I got burned by my change in #1320
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.
In groovy, both null and the empty string evaluate to false thus the contraption:
if ((TESTS_TARGETS == null) || ((TESTS_TARGETS == '')) {...}
or
if (!TESTS_TARGETS){...}
and the opposite:
if ((TESTS_TARGETS != null) && ((TESTS_TARGETS != '')) {...}
or
if (TESTS_TARGETS){...}
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.
Right. I made the mistake of wrapping quotes around null
in my change. I think this is correct.
76390db
to
e57d8d0
Compare
Allow users to choose what tests to run. Reformat Jenkins files to check for test targets build parameter. By default it runs sanity and extended tests. Remove hard-coded values for the downstream jobs name. Signed-off-by: Violeta Sebe <vsebe@ca.ibm.com>
@pshipton ready for review |
Allow users to choose what tests to run.
Reformat Jenkins files to check for test targets build parameter.
By default it runs sanity and extended tests.
Remove hard-coded values for the downstream jobs name.
Signed-off-by: Violeta Sebe vsebe@ca.ibm.com