From cb33a00992905ccb628e4552712b461c96226595 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 12 Apr 2021 22:25:17 -0700 Subject: [PATCH] Update for sharded globs Update the path bootstrap_test.sh uses to check for bpglob reruns to follow the changes made for sharding globs. Use bootstrap.GlobFileListFiles to get dependencies during bpbuild. Test: tests/bootstrap_test.sh Bug: 159845846 Change-Id: Ibaa7c4360881ed6b666a811bf34b19ea0cdcafe9 --- cmd/soong_build/main.go | 5 ++--- tests/bootstrap_test.sh | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/soong_build/main.go b/cmd/soong_build/main.go index 1e796ecca..55d5466e7 100644 --- a/cmd/soong_build/main.go +++ b/cmd/soong_build/main.go @@ -25,6 +25,7 @@ import ( "android/soong/bp2build" "android/soong/shared" + "github.com/google/blueprint/bootstrap" "github.com/google/blueprint/deptools" @@ -389,9 +390,7 @@ func runBp2Build(configuration android.Config, extraNinjaDeps []string) { blueprintArgs := bootstrap.CmdlineArgs ninjaDeps := bootstrap.RunBlueprint(blueprintArgs, bp2buildCtx.Context, configuration, extraNinjaDeps...) - for _, globPath := range bp2buildCtx.Globs() { - ninjaDeps = append(ninjaDeps, globPath.FileListFile(configuration.BuildDir())) - } + ninjaDeps = append(ninjaDeps, bootstrap.GlobFileListFiles(configuration)...) depFile := bp2buildMarker + ".d" err = deptools.WriteDepFile(shared.JoinPath(topDir, depFile), bp2buildMarker, ninjaDeps) diff --git a/tests/bootstrap_test.sh b/tests/bootstrap_test.sh index a483370f6..08d4dcfea 100755 --- a/tests/bootstrap_test.sh +++ b/tests/bootstrap_test.sh @@ -135,7 +135,7 @@ EOF run_soong local ninja_mtime1=$(stat -c "%y" out/soong/build.ninja) - local glob_deps_file=out/soong/.glob/a/__py.glob.d + local glob_deps_file=out/soong/.primary/globs/0.d if [ -e "$glob_deps_file" ]; then fail "Glob deps file unexpectedly written on first build"