Skip to content

Commit

Permalink
More debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple committed Sep 23, 2024
1 parent dece224 commit 3909701
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions scripts/tests/chiptest/test_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,32 @@ def stop(self):
return False

def factoryReset(self):
reset_start = time.monotonic()
logging.error("FACTORY RESET: %s" % self.command)
logging.error("self.killed: %s" % self.killed)
stop_start = time.monotonic()
wasRunning = (not self.killed) and self.stop()
logging.error("wasRunning: %s" % wasRunning)
stop_end = time.monotonic()
logging.error("wasRunning: %s, took %s to stop" % (wasRunning, stop_end - stop_start))

for kvs in self.kvsPathSet:
if os.path.exists(kvs):
logging.error("UNLINKING: %s" % kvs)
unlink_start = time.monotonic()
os.unlink(kvs)
unlink_end = time.monotonic()
logging.error("UNLINKING: %s, took %s" % (kvs, unlink_start - unlink_end))

if wasRunning:
start_start = time.monotonic()
started = self.start()
logging.error("STARTED: %s" % started)
start_end = time.monotonic()
logging.error("STARTED: %s in %s" % (started, start_end - start_start))
reset_end = time.monotonic()
logging.error("RESET DONE, took %s" % (reset_end - reset_start))
return started

reset_end = time.monotonic()
logging.error("RESET DONE, took %s" % (reset_end - reset_start))
return True

def waitForAnyAdvertisement(self):
Expand Down

0 comments on commit 3909701

Please sign in to comment.