mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 00:03:45 +08:00
CI: Valgrind assert leaks (#20863)
* update with improvement to process replay * reduce diff old-commit-hash: 243bec3444d6c23db20944b67d5ccf44354f63bf
This commit is contained in:
@@ -83,7 +83,9 @@ class TestValgrind(unittest.TestCase):
|
|||||||
thread.daemon = True
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
time.sleep(5) # We give the process time to start
|
while not all(pm.all_readers_updated(s) for s in config.pub_sub.keys()):
|
||||||
|
time.sleep(0)
|
||||||
|
|
||||||
for msg in tqdm(pub_msgs):
|
for msg in tqdm(pub_msgs):
|
||||||
pm.send(msg.which(), msg.as_builder())
|
pm.send(msg.which(), msg.as_builder())
|
||||||
if config.wait_for_response:
|
if config.wait_for_response:
|
||||||
@@ -100,6 +102,7 @@ class TestValgrind(unittest.TestCase):
|
|||||||
lr = LogReader(get_segment(URL))
|
lr = LogReader(get_segment(URL))
|
||||||
self.replay_process(cfg, lr)
|
self.replay_process(cfg, lr)
|
||||||
time.sleep(1) # Wait for the logs to get written
|
time.sleep(1) # Wait for the logs to get written
|
||||||
|
self.assertFalse(self.leak)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
Reference in New Issue
Block a user