c2a: Only use postsubmit when configured
Previous logic would place tests in both presubmit and postsubmit if the postsubmit_tests configuration was not specified. This is both unnecessary and wastes resources because presubmit tests are also run in postsubmit. Bug: 236006683 Test: Regenerate all TEST_MAPPINGs, manually check postsubmit removal Change-Id: Ie8ff0e351776711e07bf7646efd916d970254e9c
This commit is contained in:
@@ -298,6 +298,12 @@ class TestMapping(object):
|
||||
continue
|
||||
if test not in config['postsubmit_tests'] and 'postsubmit' in test_group:
|
||||
continue
|
||||
else:
|
||||
if 'postsubmit' in test_group:
|
||||
# If postsubmit_tests is not configured, do not place
|
||||
# anything in postsubmit - presubmit groups are
|
||||
# automatically included in postsubmit in CI.
|
||||
continue
|
||||
if test in TEST_OPTIONS:
|
||||
test_mapping[test_group].append({"name": test, "options": TEST_OPTIONS[test]})
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user