WifiDiagnosticsTest: stub out call to logcat

WifiDiagnostics.captureBugReport() forks an external
process (logcat), to read data from logd. At present,
that external process is _not_ stubbed out for testing.

As a consequence, the time to run WifiDiagnosticsTest
depends on how busy logd happens to be. This causes
problems when, e.g., running a ToT build where other
subsystems are crashy.

Resolve this problem, by stubbing out the external
process for unit tests.

Along the way: update WifiInjector, so that it hosts
an instance of java.lang.Runtime.

Bug: 34971969
Test: runtests.sh
Test: manual

Manual test:
- install a build that's suffering from b/35400537
- run wifi unit tests 5 times
- verify that no run takes longer than 35 seconds

Change-Id: Icf2c36acc04713c5ead44b47a42fa9e80cf0a1fd
3 files changed
tree: 500596b9130c17fe0c93778257c6cf4b0aa75d82
  1. libwifi_hal/
  2. libwifi_system/
  3. service/
  4. tests/
  5. PREUPLOAD.cfg