Skip to content

Commit

Permalink
gdgd
Browse files Browse the repository at this point in the history
  • Loading branch information
khancyr committed Sep 9, 2024
1 parent 3d96739 commit 59df64c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Tools/autotest/autotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ def run_step(step):
return util.build_replay(board='SITL')

if vehicle_binary is not None:
print(f"::group::{step}")
try:
binary = binary_path(step, debug=opts.debug)
os.unlink(binary)
Expand Down Expand Up @@ -719,26 +720,24 @@ def run_tests(steps):
passed = True
failed = []
failed_testinstances = dict()
should_close_group = False
print("::endgroup::")

for step in steps:
if "build" in step:
should_close_group = True
util.pexpect_close_all()

t1 = time.time()
print(">>>> RUNNING STEP: %s at %s" % (step, time.asctime()))
try:
success = run_step(step)
if "build" in step:
print("::endgroup::")
testinstance = None
if isinstance(success, tuple):
(success, testinstance) = success
if success:
results.add(step, '<span class="passed-text">PASSED</span>',
time.time() - t1)
print(">>>> PASSED STEP: %s at %s" % (step, time.asctime()))
if should_close_group:
print("::endgroup::")
should_close_group = False
else:
print(">>>> FAILED STEP: %s at %s" % (step, time.asctime()))
passed = False
Expand All @@ -752,9 +751,9 @@ def run_tests(steps):
except Exception as msg:
passed = False
failed.append(step)
print("::endgroup::")
print(">>>> FAILED STEP: %s at %s (%s)" %
(step, time.asctime(), msg))
print(f"::error file=autotest.py::{msg}")
traceback.print_exc(file=sys.stdout)
results.add(step,
'<span class="failed-text">FAILED</span>',
Expand Down
4 changes: 4 additions & 0 deletions Tools/autotest/vehicle_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -9052,6 +9052,7 @@ def run_one_test_attempt(self, test, interact=False, attempt=1, suppress_stdout=
else:
self.progress('FAILED: "%s": %s (see %s)' %
(prettyname, repr(ex), test_output_filename))
print(f"::error::FAILED: {prettyname}: {repr(ex)} (see {test_output_filename})", file=sys.stdout)
result.exception = ex
result.debug_filename = test_output_filename
if interact:
Expand Down Expand Up @@ -12301,7 +12302,9 @@ def run_tests(self, tests) -> List[Result]:

for test in tests:
self.drain_mav_unparsed()
print(f"::group::{test.name}")
result_list.append(self.run_one_test(test))
print("::endgroup::")

except pexpect.TIMEOUT:
self.progress("Failed with timeout")
Expand All @@ -12312,6 +12315,7 @@ def run_tests(self, tests) -> List[Result]:
if self.logs_dir:
if glob.glob("core*") or glob.glob("ap-*.core"):
self.check_logs("FRAMEWORK")
print("::endgroup::")

if self.rc_thread is not None:
self.progress("Joining RC thread")
Expand Down

0 comments on commit 59df64c

Please sign in to comment.