mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
autotest: add scan-build autotest steps
This commit is contained in:
parent
e51427a2bc
commit
749b678e14
@ -160,6 +160,24 @@ def run_unit_tests():
|
||||
success = False
|
||||
return success
|
||||
|
||||
def run_clang_scan_build():
|
||||
if util.run_cmd("scan-build python waf configure",
|
||||
directory=util.reltopdir('.')) != 0:
|
||||
print("Failed scan-build-configure")
|
||||
return False
|
||||
|
||||
if util.run_cmd("scan-build python waf clean",
|
||||
directory=util.reltopdir('.')) != 0:
|
||||
print("Failed scan-build-clean")
|
||||
return False
|
||||
|
||||
if util.run_cmd("scan-build python waf build",
|
||||
directory=util.reltopdir('.')) != 0:
|
||||
print("Failed scan-build-build")
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def param_parse_filepath():
|
||||
return util.reltopdir('Tools/autotest/param_metadata/param_parse.py')
|
||||
|
||||
@ -419,6 +437,9 @@ def run_step(step):
|
||||
if step == 'run.unit_tests':
|
||||
return run_unit_tests()
|
||||
|
||||
if step == 'clang-scan-build':
|
||||
return run_clang_scan_build()
|
||||
|
||||
raise RuntimeError("Unknown step %s" % step)
|
||||
|
||||
|
||||
@ -823,6 +844,7 @@ if __name__ == "__main__":
|
||||
moresteps = [
|
||||
'test.CopterTests1',
|
||||
'test.CopterTests2',
|
||||
'clang-scan-build',
|
||||
]
|
||||
|
||||
# canonicalise the step names. This allows
|
||||
|
Loading…
Reference in New Issue
Block a user