Revert "Revert "Revert "Revert "Add path interposer""""

This reverts commit 09f4540d66.

Fixes the raw call to net.Listen in the tests to go through the listen()
helper and use the long socket path fallbacks.

Removes the use of timeouts from the tests -- the behaviors being tested
did not rely on timeouts, so removing them will reduce the flakiness if
the build is heavily loading the machine at the same time the test is
running.

Also fixes some potential nil pointer dereferences.

Test: OUT_DIR=<really long> m blueprint_tools
Test: `while .../soong-ui-build-paths/test/test; do sleep 0.01; done` with a build running
Change-Id: I16d44be7517bc415f1c808284088f4ba40df3bfa
This commit is contained in:
Dan Willemsen
2018-05-25 16:30:04 -07:00
parent 86a60ae6fa
commit 184901135c
12 changed files with 1161 additions and 2 deletions

View File

@@ -12,10 +12,23 @@
// See the License for the specific language governing permissions and
// limitations under the License.
bootstrap_go_package {
name: "soong-ui-build-paths",
pkgPath: "android/soong/ui/build/paths",
srcs: [
"paths/config.go",
"paths/logs.go",
],
testSrcs: [
"paths/logs_test.go",
],
}
bootstrap_go_package {
name: "soong-ui-build",
pkgPath: "android/soong/ui/build",
deps: [
"soong-ui-build-paths",
"soong-ui-logger",
"soong-ui-tracer",
"soong-shared",
@@ -33,6 +46,7 @@ bootstrap_go_package {
"finder.go",
"kati.go",
"ninja.go",
"path.go",
"proc_sync.go",
"signal.go",
"soong.go",