Permalink
Browse files

Add --accept-all-licences to ./mach bootstrap-android

  • Loading branch information...
SimonSapin committed Oct 11, 2018
1 parent 89e1878 commit 6c82c471c526f7d08613ba70659e51d248b07f82

This file was deleted.

Oops, something went wrong.
@@ -180,7 +180,7 @@ android:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- ./etc/ci/clean_build_artifacts.sh
- ./etc/ci/bootstrap-android-and-accept-licences.sh --build
- ./mach bootstrap-android --accept-all-licences --build
- env --unset ANDROID_NDK --unset ANDROID_SDK ./mach build --android --dev
- env --unset ANDROID_NDK --unset ANDROID_SDK ./mach package --android --dev
- bash ./etc/ci/lockfile_changed.sh
@@ -191,7 +191,7 @@ android-mac:
commands:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- ./etc/ci/bootstrap-android-and-accept-licences.sh --build
- ./mach bootstrap-android --accept-all-licences --build
- ./mach build --android --dev
- ./mach package --android --dev
- bash ./etc/ci/lockfile_changed.sh
@@ -205,7 +205,7 @@ android-x86:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- ./etc/ci/clean_build_artifacts.sh
- ./etc/ci/bootstrap-android-and-accept-licences.sh --build --emulator-x86
- ./mach bootstrap-android --accept-all-licences --build --emulator-x86
- env --unset ANDROID_NDK --unset ANDROID_SDK ./mach build --target i686-linux-android --release
- env --unset ANDROID_NDK --unset ANDROID_SDK ./mach test-android-startup --release
- env --unset ANDROID_NDK --unset ANDROID_SDK ./mach test-wpt-android --release /_mozilla/mozilla/DOMParser.html /_mozilla/mozilla/webgl/context_creation_error.html
@@ -220,7 +220,7 @@ android-nightly:
- ./mach clean-nightlies --keep 3 --force
- ./mach clean-cargo-cache --keep 3 --force
- ./etc/ci/clean_build_artifacts.sh
- ./etc/ci/bootstrap-android-and-accept-licences.sh --build
- ./mach bootstrap-android --accept-all-licences --build
- env --unset ANDROID_NDK --unset ANDROID_SDK ./mach build --android --release
- env --unset ANDROID_NDK --unset ANDROID_SDK ./mach package --android --release --maven
- env --unset ANDROID_NDK --unset ANDROID_SDK ./mach build --target=i686-linux-android --release
@@ -87,7 +87,7 @@ def android_arm32():
# wget: servo-media-gstreamer’s build script
.with_script("""
apt-get install -y --no-install-recommends openjdk-8-jdk-headless file wget
yes | ./mach bootstrap-android --build
./mach bootstrap-android --accept-all-licences --build
./mach build --android --release
""")
.with_artifacts(
@@ -85,7 +85,10 @@ def bootstrap_gstreamer(self, force=False):
@CommandArgument('--emulator-x86',
action='store_true',
help='Install Android x86 emulator and system image')
def bootstrap_android(self, build=False, emulator_x86=False):
@CommandArgument('--accept-all-licences',
action='store_true',
help='For non-interactive use')
def bootstrap_android(self, build=False, emulator_x86=False, accept_all_licences=False):
if not (build or emulator_x86):
print("Must specify `--build` or `--emulator-x86` or both.")
@@ -156,9 +159,14 @@ def download(target_dir, name, flatten=False):
components += [
"platforms;android-18",
]
subprocess.check_call(
[path.join(toolchains, "sdk", "tools", "bin", "sdkmanager")] + components
)
sdkmanager = [path.join(toolchains, "sdk", "tools", "bin", "sdkmanager")] + components
if accept_all_licences:
yes = subprocess.Popen(["yes"], stdout=subprocess.PIPE)
subprocess.check_call(sdkmanager, stdin=yes.stdout)
yes.terminate()
else:
subprocess.check_call(sdkmanager)
if emulator_x86:
avd_path = path.join(toolchains, "avd", "servo-x86")

0 comments on commit 6c82c47

Please sign in to comment.