autotest: packet_capturer: remove files in stop_capture()

At present, stop_capture() copies the capture file from
the capture host to the tester, and adds the capture
file to a list of files to be deleted 'later'. For this
to work, we have to be sure that someone will eventually
call close() on the PacketCapturer.

In practice, it's hard to provide such assurance. Moreover,
we haven't yet found any need to keep the capture file on
the packet capture host, after we've copied the file over
to the tester.

So: remove a packet capture (and associated log) from the
packet capture host, as soon as stop_capture() has copied
the files over to the tester.

BUG=chromium:535325
TEST=network_WiFi_VisibleScan

Change-Id: I4173fe0e32d44b3b6ad3c7473c96035029150459
Reviewed-on: https://chromium-review.googlesource.com/302222
Commit-Ready: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
1 file changed