Loading bp2build/symlink_forest.go +2 −9 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ type symlinkForestContext struct { depCh chan string mkdirCount atomic.Uint64 symlinkCount atomic.Uint64 okay atomic.Bool // Whether the forest was successfully constructed } // A simple thread pool to limit concurrency on system calls. Loading Loading @@ -366,14 +365,14 @@ func plantSymlinkForestRecursive(context *symlinkForestContext, instructions *in if err != nil { fmt.Fprintf(os.Stderr, "Error merging %s and %s: %s", srcBuildFile, generatedBuildFile, err) context.okay.Store(false) os.Exit(1) } } else { // Both exist and one is a file. This is an error. fmt.Fprintf(os.Stderr, "Conflict in workspace symlink tree creation: both '%s' and '%s' exist and exactly one is a directory\n", srcChild, buildFilesChild) context.okay.Store(false) os.Exit(1) } } } Loading Loading @@ -436,8 +435,6 @@ func PlantSymlinkForest(verbose bool, topdir string, forest string, buildFiles s symlinkCount: atomic.Uint64{}, } context.okay.Store(true) removeParallel(shared.JoinPath(topdir, forest)) instructions := instructionsFromExcludePathList(exclude) Loading @@ -452,9 +449,5 @@ func PlantSymlinkForest(verbose bool, topdir string, forest string, buildFiles s deps = append(deps, dep) } if !context.okay.Load() { os.Exit(1) } return deps, context.mkdirCount.Load(), context.symlinkCount.Load() } tests/bootstrap_test.sh +2 −5 Original line number Diff line number Diff line Loading @@ -75,7 +75,6 @@ EOF grep -q "^# Module:.*my_great_binary_host" out/soong/build.ninja || fail "new module not found" } function test_add_android_bp() { setup run_soong Loading Loading @@ -313,7 +312,6 @@ function test_create_global_include_directory() { } function test_add_file_to_soong_build() { setup run_soong Loading Loading @@ -736,7 +734,6 @@ function test_json_module_graph_back_and_forth_null_build() { } function test_bp2build_bazel_workspace_structure { setup Loading Loading @@ -802,7 +799,7 @@ EOF || fail "${GENERATED_BUILD_FILE_NAME} files symlinked to the wrong place" } function test_bp2build_reports_multiple_errors { function test_bp2build_fails_fast { setup mkdir -p "a/${GENERATED_BUILD_FILE_NAME}" Loading Loading @@ -830,7 +827,7 @@ EOF fi grep -q "a/${GENERATED_BUILD_FILE_NAME}' exist" "$MOCK_TOP/errors" || fail "Error for a/${GENERATED_BUILD_FILE_NAME} not found" grep -q "b/${GENERATED_BUILD_FILE_NAME}' exist" "$MOCK_TOP/errors" || fail "Error for b/${GENERATED_BUILD_FILE_NAME} not found" grep -q -v "b/${GENERATED_BUILD_FILE_NAME}' exist" "$MOCK_TOP/errors" || fail "Error for b/${GENERATED_BUILD_FILE_NAME} found but not expected" } function test_bp2build_back_and_forth_null_build { Loading Loading
bp2build/symlink_forest.go +2 −9 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ type symlinkForestContext struct { depCh chan string mkdirCount atomic.Uint64 symlinkCount atomic.Uint64 okay atomic.Bool // Whether the forest was successfully constructed } // A simple thread pool to limit concurrency on system calls. Loading Loading @@ -366,14 +365,14 @@ func plantSymlinkForestRecursive(context *symlinkForestContext, instructions *in if err != nil { fmt.Fprintf(os.Stderr, "Error merging %s and %s: %s", srcBuildFile, generatedBuildFile, err) context.okay.Store(false) os.Exit(1) } } else { // Both exist and one is a file. This is an error. fmt.Fprintf(os.Stderr, "Conflict in workspace symlink tree creation: both '%s' and '%s' exist and exactly one is a directory\n", srcChild, buildFilesChild) context.okay.Store(false) os.Exit(1) } } } Loading Loading @@ -436,8 +435,6 @@ func PlantSymlinkForest(verbose bool, topdir string, forest string, buildFiles s symlinkCount: atomic.Uint64{}, } context.okay.Store(true) removeParallel(shared.JoinPath(topdir, forest)) instructions := instructionsFromExcludePathList(exclude) Loading @@ -452,9 +449,5 @@ func PlantSymlinkForest(verbose bool, topdir string, forest string, buildFiles s deps = append(deps, dep) } if !context.okay.Load() { os.Exit(1) } return deps, context.mkdirCount.Load(), context.symlinkCount.Load() }
tests/bootstrap_test.sh +2 −5 Original line number Diff line number Diff line Loading @@ -75,7 +75,6 @@ EOF grep -q "^# Module:.*my_great_binary_host" out/soong/build.ninja || fail "new module not found" } function test_add_android_bp() { setup run_soong Loading Loading @@ -313,7 +312,6 @@ function test_create_global_include_directory() { } function test_add_file_to_soong_build() { setup run_soong Loading Loading @@ -736,7 +734,6 @@ function test_json_module_graph_back_and_forth_null_build() { } function test_bp2build_bazel_workspace_structure { setup Loading Loading @@ -802,7 +799,7 @@ EOF || fail "${GENERATED_BUILD_FILE_NAME} files symlinked to the wrong place" } function test_bp2build_reports_multiple_errors { function test_bp2build_fails_fast { setup mkdir -p "a/${GENERATED_BUILD_FILE_NAME}" Loading Loading @@ -830,7 +827,7 @@ EOF fi grep -q "a/${GENERATED_BUILD_FILE_NAME}' exist" "$MOCK_TOP/errors" || fail "Error for a/${GENERATED_BUILD_FILE_NAME} not found" grep -q "b/${GENERATED_BUILD_FILE_NAME}' exist" "$MOCK_TOP/errors" || fail "Error for b/${GENERATED_BUILD_FILE_NAME} not found" grep -q -v "b/${GENERATED_BUILD_FILE_NAME}' exist" "$MOCK_TOP/errors" || fail "Error for b/${GENERATED_BUILD_FILE_NAME} found but not expected" } function test_bp2build_back_and_forth_null_build { Loading