Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Android/tools/tools/external_updater/   (Android Betriebssystem Version 17©)  Datei vom 26.5.2026 mit Größe 4 kB image not shown  

Quelle  Android.bp   Sprache: unbekannt

 
Spracherkennung für: .bp vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

python_binary_host {
    name: "external_updater",
    main: "external_updater.py",
    srcs: ["external_updater.py"],
    libs: ["external_updater_lib"],
    required: ["cargo_embargo"],
    data: [":bpfmt"],
    embedded_launcher: false,
}

python_binary_host {
    name: "external_updater_notifier",
    main: "notifier.py",
    srcs: ["notifier.py"],
}

python_library_host {
    name: "external_updater_lib",
    srcs: [
        "archive_utils.py",
        "base_updater.py",
        "color.py",
        "crates_updater.py",
        "fileutils.py",
        "git_updater.py",
        "git_utils.py",
        "github_archive_updater.py",
        "hashtags.py",
        "manifest.py",
        "metadata.proto",
        "reviewers.py",
        "updater_utils.py",
    ],
    libs: [
        "libprotobuf-python",
    ],
    proto: {
        canonical_path_from_root: false,
    },
    data: [
        "update_package.sh",
        "regen_bp.sh",
    ],
}

python_defaults {
    name: "external_updater_test_defaults",
}

python_library_host {
    name: "external_updater_test_lib",
    srcs: [
        "tests/gitrepo.py",
    ],
    proto: {
        canonical_path_from_root: false,
    },
}

python_test_host {
    name: "external_updater_fileutils_test",
    defaults: ["external_updater_test_defaults"],
    main: "test_fileutils.py",
    srcs: ["test_fileutils.py"],
    libs: ["external_updater_lib"],
    test_options: {
        unit_test: true,
    },
}

python_test_host {
    name: "external_updater_github_archive_updater_test",
    defaults: ["external_updater_test_defaults"],
    main: "test_github_archive_updater.py",
    srcs: ["test_github_archive_updater.py"],
    libs: ["external_updater_lib"],
    test_options: {
        unit_test: true,
    },
}

python_test_host {
    name: "external_updater_reviewers_test",
    defaults: ["external_updater_test_defaults"],
    main: "external_updater_reviewers_test.py",
    srcs: ["external_updater_reviewers_test.py"],
    libs: ["external_updater_lib"],
    test_options: {
        unit_test: true,
    },
}

python_test_host {
    name: "external_updater_git_utils_test",
    defaults: ["external_updater_test_defaults"],
    main: "tests/test_git_utils.py",
    srcs: ["tests/test_git_utils.py"],
    libs: [
        "external_updater_lib",
        "external_updater_test_lib",
    ],
    test_options: {
        unit_test: true,
    },
}

python_test_host {
    name: "external_updater_gitrepo_test",
    defaults: ["external_updater_test_defaults"],
    main: "tests/test_gitrepo.py",
    srcs: ["tests/test_gitrepo.py"],
    libs: [
        "external_updater_test_lib",
    ],
    test_options: {
        unit_test: true,
    },
}

// This test is intentionally not in the tests/ directory. Everything in the
// tests/ directory should be runnable with pytest, and this file is not because
// it depends on the generated protobuf modules.
python_test_host {
    name: "external_updater_base_updater_test",
    defaults: ["external_updater_test_defaults"],
    main: "test_base_updater.py",
    srcs: ["test_base_updater.py"],
    libs: [
        "external_updater_lib",
        "external_updater_test_lib",
    ],
    test_options: {
        unit_test: true,
    },
}

python_test_host {
    name: "external_updater_git_updater_test",
    defaults: ["external_updater_test_defaults"],
    main: "test_git_updater.py",
    srcs: ["test_git_updater.py"],
    libs: [
        "external_updater_lib",
        "external_updater_test_lib",
    ],
    test_options: {
        unit_test: true,
    },
}

// Same as above. Needs protobuf.
python_test_host {
    name: "external_updater_updater_utils_test",
    defaults: ["external_updater_test_defaults"],
    main: "test_updater_utils.py",
    srcs: ["test_updater_utils.py"],
    libs: [
        "external_updater_lib",
        "external_updater_test_lib",
    ],
    test_options: {
        unit_test: true,
    },
}

// The tests in tests/endtoend are not built as a Soong module because we can't
// run those tests via python_test_host. It's an end-to-end test so it needs to
// run `repo`, but `repo init` will try to clone the real repo source (the thing
// in PATH is just a launcher), which our Python can't do (the SSL module's
// certificate validation is not configured for that). Run those tests with
// `pytest tests/endtoend`.

[Dauer der Verarbeitung: 0.20 Sekunden, vorverarbeitet 2026-06-27]