================
@@ -15,32 +15,39 @@
# process scheduling can cause a massive (minutes) delay during this test.
@skipIf(oslist=["linux"], archs=["arm$"])
class TestDAP_attach(lldbdap_testcase.DAPTestCaseBase):
- def spawn(self, args):
- self.process = subprocess.Popen(
- args,
- stdin=subprocess.PIPE,
+ def spawn(self, program, args=None):
+ return self.spawnSubprocess(
+ executable=program,
+ args=args,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
)
def spawn_and_wait(self, program, delay):
time.sleep(delay)
- self.spawn([program])
- self.process.wait()
+ proc = self.spawn(program=program)
+ # Wait for either the process to exit or the event to be set
+ while proc.poll() is None and not self.spawn_event.is_set():
----------------
JDevlieghere wrote:
Why does this need to run in a loop at all? When does `proc.wait` return that
we need to send a `kill` again?
https://github.com/llvm/llvm-project/pull/172879
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits