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"
|
system_image = "google_apis;armeabi-v7a"
|
||||||
avd_name = "servo-armv7"
|
avd_name = "servo-armv7"
|
||||||
|
|
||||||
|
|
||||||
toolchains = path.join(self.context.topdir, "android-toolchains")
|
toolchains = path.join(self.context.topdir, "android-toolchains")
|
||||||
if not path.isdir(toolchains):
|
if not path.isdir(toolchains):
|
||||||
os.makedirs(toolchains)
|
os.makedirs(toolchains)
|
||||||
|
|
|
@ -153,6 +153,7 @@ def download_file(desc, src, dst):
|
||||||
download(desc, src, fd)
|
download(desc, src, fd)
|
||||||
os.rename(tmp_path, dst)
|
os.rename(tmp_path, dst)
|
||||||
|
|
||||||
|
|
||||||
# https://stackoverflow.com/questions/39296101/python-zipfile-removes-execute-permissions-from-binaries
|
# https://stackoverflow.com/questions/39296101/python-zipfile-removes-execute-permissions-from-binaries
|
||||||
# In particular, we want the executable bit for executable files.
|
# In particular, we want the executable bit for executable files.
|
||||||
class ZipFileWithUnixPermissions(zipfile.ZipFile):
|
class ZipFileWithUnixPermissions(zipfile.ZipFile):
|
||||||
|
@ -169,6 +170,7 @@ class ZipFileWithUnixPermissions(zipfile.ZipFile):
|
||||||
os.chmod(extracted, mode)
|
os.chmod(extracted, mode)
|
||||||
return extracted
|
return extracted
|
||||||
|
|
||||||
|
|
||||||
def extract(src, dst, movedir=None, remove=True):
|
def extract(src, dst, movedir=None, remove=True):
|
||||||
assert src.endswith(".zip")
|
assert src.endswith(".zip")
|
||||||
ZipFileWithUnixPermissions(src).extractall(dst)
|
ZipFileWithUnixPermissions(src).extractall(dst)
|
||||||
|
@ -183,6 +185,7 @@ def extract(src, dst, movedir=None, remove=True):
|
||||||
if remove:
|
if remove:
|
||||||
os.remove(src)
|
os.remove(src)
|
||||||
|
|
||||||
|
|
||||||
def check_hash(filename, expected, algorithm):
|
def check_hash(filename, expected, algorithm):
|
||||||
hasher = hashlib.new(algorithm)
|
hasher = hashlib.new(algorithm)
|
||||||
with open(filename, "rb") as f:
|
with open(filename, "rb") as f:
|
||||||
|
|
|
@ -58,6 +58,7 @@ files = [
|
||||||
"./resources/hsts_preload.json",
|
"./resources/hsts_preload.json",
|
||||||
"./tests/wpt/metadata/MANIFEST.json",
|
"./tests/wpt/metadata/MANIFEST.json",
|
||||||
"./support/android/openssl.sh",
|
"./support/android/openssl.sh",
|
||||||
|
"./support/android/egl-configs/Cargo.lock",
|
||||||
# Upstream code from Khronos/WebGL uses tabs for indentation
|
# Upstream code from Khronos/WebGL uses tabs for indentation
|
||||||
"./tests/wpt/mozilla/tests/webgl",
|
"./tests/wpt/mozilla/tests/webgl",
|
||||||
# Ignore those files since the issues reported are on purpose
|
# Ignore those files since the issues reported are on purpose
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "egl-configs"
|
name = "egl-configs"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
license = "MPL-2.0"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
gl_generator = "0.9"
|
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;
|
extern crate gl_generator;
|
||||||
|
|
||||||
use gl_generator::{Registry, Api, Profile, Fallbacks};
|
use gl_generator::{Registry, Api, Profile, Fallbacks};
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
NDK=../../../android-toolchains/android-ndk-r12b-linux-x86_64/android-ndk-r12b
|
|
||||||
|
|
||||||
"${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" \
|
--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
|
# Any
|
||||||
#target=""
|
target=""
|
||||||
|
|
||||||
# Specific device
|
# Specific device
|
||||||
#target="-s something"
|
#target="-s something"
|
||||||
|
|
||||||
# Emulator
|
# Emulator
|
||||||
target="-e"
|
#target="-e"
|
||||||
|
|
||||||
# USB
|
# USB
|
||||||
#target="-d"
|
#target="-d"
|
||||||
|
|
||||||
path="$1"
|
path="${1}"
|
||||||
base="$(basename $1)"
|
base="$(basename ${1})"
|
||||||
remote_path="/data/local/tmp/$base"
|
remote_path="/data/local/tmp/${base}"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
adb $target "wait-for-device"
|
adb ${target} "wait-for-device"
|
||||||
adb $target push "$path" "$remote_path" >&2
|
adb ${target} push "${path}" "${remote_path}" >&2
|
||||||
adb $target shell "$remote_path" "$@"
|
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)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
||||||
use std::os::raw::*;
|
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::*;
|
||||||
use ffi::types::*;
|
use ffi::types::*;
|
||||||
use std::ptr::null_mut;
|
use std::ptr::null_mut;
|
||||||
|
@ -11,8 +15,8 @@ fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! check {
|
macro_rules! check {
|
||||||
($name: ident ( $($arg: expr),* )) => {
|
($name: ident($($arg: expr),*)) => {
|
||||||
check($name( $($arg),* ), stringify!($name))
|
check($name($($arg),*), stringify!($name))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue