Skip to content
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

Update feature flag handling for required features #614

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/org/testKitGen/TestInfoParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ public TestInfo parse() {
for (Map.Entry<String,String> entry : ti.getFeatures().entrySet()) {
String featureOpt = entry.getValue().toLowerCase();
if (featureOpt.equals("required")) {
if (!isFeatureInTestFlags(testFlags, entry.getKey())) {
return null;
if (isFeatureInTestFlags(testFlags, entry.getKey())) {
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change, if there is no test flag and feature match, the test will run. This is not expected behavior.
Grinder - test run with TEST_FLAG=empty.

}
} else if (featureOpt.equals("nonapplicable")) {
// Do not generate make target if the test is not applicable for one feature defined in TEST_FLAG
Expand Down