Skip to content

Commit

Permalink
Add CI check for CMAKE_BUILD_TYPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Jul 26, 2022
1 parent bfa34de commit d2eda9f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/easyconfigs/easyconfigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,24 @@ def check_https_url(http_url):
if failing_checks:
self.fail('\n'.join(failing_checks))

@skip_if_not_pr_to_non_main_branch()
def test_pr_CMAKE_BUILD_TYPE(self):
"""Make sure -DCMAKE_BUILD_TYPE is no longer used (replaced by build_type)"""
failing_checks = []
for ec in self.changed_ecs:
ec_fn = os.path.basename(ec.path)
configopts = ec.get('configopts')
build_type = ec.get('build_type')

if configopts and '-DCMAKE_BUILD_TYPE' in configopts:
failing_checks.append("Found -DCMAKE_BUILD_TYPE in configopts. Use build_type instead: %s" % ec_fn)
if build_type == 'Release':
failing_checks.append("build_type was set to the default of 'Release'. "
"Ommit this to base it on toolchain_opts.debug: %s" % ec_fn)
if failing_checks:
self.fail('\n'.join(failing_checks))


@skip_if_not_pr_to_non_main_branch()
def test_pr_patch_descr(self):
"""
Expand Down

0 comments on commit d2eda9f

Please sign in to comment.