Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 58358d9

Browse files
khancyrtridge
authored andcommitted
Tools: correct arguments passing on autotest.py
1 parent f4e2d46 commit 58358d9

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

Tools/autotest/autotest.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ def build_binaries():
125125
return True
126126

127127

128-
def build_examples():
128+
def build_examples(**kwargs):
129129
"""Build examples."""
130130
for target in 'fmuv2', 'Pixhawk1', 'navio', 'linux':
131131
print("Running build.examples for %s" % target)
132132
try:
133-
util.build_examples(target)
133+
util.build_examples(target, **kwargs)
134134
except Exception as e:
135135
print("Failed build_examples on board=%s" % target)
136136
print(str(e))
@@ -139,12 +139,13 @@ def build_examples():
139139
return True
140140

141141

142-
def build_unit_tests():
142+
def build_unit_tests(**kwargs):
143143
"""Build tests."""
144144
for target in ['linux']:
145145
print("Running build.unit_tests for %s" % target)
146+
print(*kwargs)
146147
try:
147-
util.build_tests(target)
148+
util.build_tests(target, **kwargs)
148149
except Exception as e:
149150
print("Failed build.unit_tests on board=%s" % target)
150151
print(str(e))
@@ -516,7 +517,7 @@ def run_step(step):
516517
return build_binaries()
517518

518519
if step == 'build.examples':
519-
return build_examples()
520+
return build_examples(**build_opts)
520521

521522
if step == 'run.examples':
522523
return examples.run_examples(debug=opts.debug, valgrind=False, gdb=False)
@@ -528,7 +529,7 @@ def run_step(step):
528529
return convert_gpx()
529530

530531
if step == 'build.unit_tests':
531-
return build_unit_tests()
532+
return build_unit_tests(**build_opts)
532533

533534
if step == 'run.unit_tests':
534535
return run_unit_tests()

0 commit comments

Comments
 (0)