mirror of
https://github.com/servo/servo.git
synced 2025-07-02 04:53:39 +01:00
Tidy
This commit is contained in:
parent
6e6870516e
commit
484eee8624
9 changed files with 50 additions and 16 deletions
|
@ -72,7 +72,6 @@ class MachCommands(CommandBase):
|
|||
system_image = "google_apis;armeabi-v7a"
|
||||
avd_name = "servo-armv7"
|
||||
|
||||
|
||||
toolchains = path.join(self.context.topdir, "android-toolchains")
|
||||
if not path.isdir(toolchains):
|
||||
os.makedirs(toolchains)
|
||||
|
|
|
@ -153,6 +153,7 @@ def download_file(desc, src, dst):
|
|||
download(desc, src, fd)
|
||||
os.rename(tmp_path, dst)
|
||||
|
||||
|
||||
# https://stackoverflow.com/questions/39296101/python-zipfile-removes-execute-permissions-from-binaries
|
||||
# In particular, we want the executable bit for executable files.
|
||||
class ZipFileWithUnixPermissions(zipfile.ZipFile):
|
||||
|
@ -169,6 +170,7 @@ class ZipFileWithUnixPermissions(zipfile.ZipFile):
|
|||
os.chmod(extracted, mode)
|
||||
return extracted
|
||||
|
||||
|
||||
def extract(src, dst, movedir=None, remove=True):
|
||||
assert src.endswith(".zip")
|
||||
ZipFileWithUnixPermissions(src).extractall(dst)
|
||||
|
@ -183,6 +185,7 @@ def extract(src, dst, movedir=None, remove=True):
|
|||
if remove:
|
||||
os.remove(src)
|
||||
|
||||
|
||||
def check_hash(filename, expected, algorithm):
|
||||
hasher = hashlib.new(algorithm)
|
||||
with open(filename, "rb") as f:
|
||||
|
|
|
@ -58,6 +58,7 @@ files = [
|
|||
"./resources/hsts_preload.json",
|
||||
"./tests/wpt/metadata/MANIFEST.json",
|
||||
"./support/android/openssl.sh",
|
||||
"./support/android/egl-configs/Cargo.lock",
|
||||
# Upstream code from Khronos/WebGL uses tabs for indentation
|
||||
"./tests/wpt/mozilla/tests/webgl",
|
||||
# Ignore those files since the issues reported are on purpose
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
[package]
|
||||
name = "egl-configs"
|
||||
version = "0.1.0"
|
||||
license = "MPL-2.0"
|
||||
|
||||
[build-dependencies]
|
||||
gl_generator = "0.9"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
extern crate gl_generator;
|
||||
|
||||
use gl_generator::{Registry, Api, Profile, Fallbacks};
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
#!/bin/sh
|
||||
NDK=../../../android-toolchains/android-ndk-r12b-linux-x86_64/android-ndk-r12b
|
||||
#!/usr/bin/env bash
|
||||
|
||||
"${NDK}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc" \
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
NDK=../../../android-toolchains/android-ndk-r12b-linux-x86_64/android-ndk-r12b
|
||||
BIN="${NDK}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/"
|
||||
|
||||
"${BIN}/arm-linux-androideabi-gcc" \
|
||||
--sysroot "${NDK}/platforms/android-18/arch-arm" \
|
||||
"$@"
|
||||
"${@}"
|
||||
|
|
|
@ -1,22 +1,30 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
# Any
|
||||
#target=""
|
||||
target=""
|
||||
|
||||
# Specific device
|
||||
#target="-s something"
|
||||
|
||||
# Emulator
|
||||
target="-e"
|
||||
#target="-e"
|
||||
|
||||
# USB
|
||||
#target="-d"
|
||||
|
||||
path="$1"
|
||||
base="$(basename $1)"
|
||||
remote_path="/data/local/tmp/$base"
|
||||
path="${1}"
|
||||
base="$(basename ${1})"
|
||||
remote_path="/data/local/tmp/${base}"
|
||||
shift
|
||||
|
||||
adb $target "wait-for-device"
|
||||
adb $target push "$path" "$remote_path" >&2
|
||||
adb $target shell "$remote_path" "$@"
|
||||
adb ${target} "wait-for-device"
|
||||
adb ${target} push "${path}" "${remote_path}" >&2
|
||||
adb ${target} shell "${remote_path}" "${@}"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
use std::os::raw::*;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use ffi::*;
|
||||
use ffi::types::*;
|
||||
use std::ptr::null_mut;
|
||||
|
@ -11,8 +15,8 @@ fn main() {
|
|||
}
|
||||
|
||||
macro_rules! check {
|
||||
($name: ident ( $($arg: expr),* )) => {
|
||||
check($name( $($arg),* ), stringify!($name))
|
||||
($name: ident($($arg: expr),*)) => {
|
||||
check($name($($arg),*), stringify!($name))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue