Apply changes to fix python linting errors
This commit is contained in:
parent
4b71d79c97
commit
22d00dcd47
22 changed files with 58 additions and 49 deletions
|
@ -3,7 +3,6 @@ import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
from os import walk
|
|
||||||
|
|
||||||
|
|
||||||
def run_command(command, cwd=None):
|
def run_command(command, cwd=None):
|
||||||
|
@ -180,7 +179,7 @@ def update_intrinsics(llvm_path, llvmint, llvmint2):
|
||||||
intrinsics[arch].sort(key=lambda x: (x[0], x[2]))
|
intrinsics[arch].sort(key=lambda x: (x[0], x[2]))
|
||||||
out.write(' // {}\n'.format(arch))
|
out.write(' // {}\n'.format(arch))
|
||||||
for entry in intrinsics[arch]:
|
for entry in intrinsics[arch]:
|
||||||
if entry[2] == True: # if it is a duplicate
|
if entry[2] is True: # if it is a duplicate
|
||||||
out.write(' // [DUPLICATE]: "{}" => "{}",\n'.format(entry[0], entry[1]))
|
out.write(' // [DUPLICATE]: "{}" => "{}",\n'.format(entry[0], entry[1]))
|
||||||
elif "_round_mask" in entry[1]:
|
elif "_round_mask" in entry[1]:
|
||||||
out.write(' // [INVALID CONVERSION]: "{}" => "{}",\n'.format(entry[0], entry[1]))
|
out.write(' // [INVALID CONVERSION]: "{}" => "{}",\n'.format(entry[0], entry[1]))
|
||||||
|
|
|
@ -119,7 +119,7 @@ def print_singletons(uppers, lowers, uppersname, lowersname):
|
||||||
print("#[rustfmt::skip]")
|
print("#[rustfmt::skip]")
|
||||||
print("const {}: &[u8] = &[".format(lowersname))
|
print("const {}: &[u8] = &[".format(lowersname))
|
||||||
for i in range(0, len(lowers), 8):
|
for i in range(0, len(lowers), 8):
|
||||||
print(" {}".format(" ".join("{:#04x},".format(l) for l in lowers[i:i+8])))
|
print(" {}".format(" ".join("{:#04x},".format(x) for x in lowers[i:i+8])))
|
||||||
print("];")
|
print("];")
|
||||||
|
|
||||||
def print_normal(normal, normalname):
|
def print_normal(normal, normalname):
|
||||||
|
|
|
@ -620,7 +620,7 @@ class RustBuild(object):
|
||||||
# The latter one does not exist on NixOS when using tmpfs as root.
|
# The latter one does not exist on NixOS when using tmpfs as root.
|
||||||
try:
|
try:
|
||||||
with open("/etc/os-release", "r") as f:
|
with open("/etc/os-release", "r") as f:
|
||||||
if not any(l.strip() in ("ID=nixos", "ID='nixos'", 'ID="nixos"') for l in f):
|
if not any(ln.strip() in ("ID=nixos", "ID='nixos'", 'ID="nixos"') for ln in f):
|
||||||
return False
|
return False
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
return False
|
return False
|
||||||
|
@ -872,7 +872,7 @@ class RustBuild(object):
|
||||||
}
|
}
|
||||||
for var_name, toml_key in var_data.items():
|
for var_name, toml_key in var_data.items():
|
||||||
toml_val = self.get_toml(toml_key, build_section)
|
toml_val = self.get_toml(toml_key, build_section)
|
||||||
if toml_val != None:
|
if toml_val is not None:
|
||||||
env["{}_{}".format(var_name, host_triple_sanitized)] = toml_val
|
env["{}_{}".format(var_name, host_triple_sanitized)] = toml_val
|
||||||
|
|
||||||
# preserve existing RUSTFLAGS
|
# preserve existing RUSTFLAGS
|
||||||
|
|
|
@ -9,7 +9,7 @@ rust_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
rust_dir = os.path.dirname(rust_dir)
|
rust_dir = os.path.dirname(rust_dir)
|
||||||
rust_dir = os.path.dirname(rust_dir)
|
rust_dir = os.path.dirname(rust_dir)
|
||||||
sys.path.append(os.path.join(rust_dir, "src", "bootstrap"))
|
sys.path.append(os.path.join(rust_dir, "src", "bootstrap"))
|
||||||
import bootstrap
|
import bootstrap # noqa: E402
|
||||||
|
|
||||||
|
|
||||||
class Option(object):
|
class Option(object):
|
||||||
|
@ -319,7 +319,7 @@ def apply_args(known_args, option_checking, config):
|
||||||
for key in known_args:
|
for key in known_args:
|
||||||
# The `set` option is special and can be passed a bunch of times
|
# The `set` option is special and can be passed a bunch of times
|
||||||
if key == 'set':
|
if key == 'set':
|
||||||
for option, value in known_args[key]:
|
for _option, value in known_args[key]:
|
||||||
keyval = value.split('=', 1)
|
keyval = value.split('=', 1)
|
||||||
if len(keyval) == 1 or keyval[1] == "true":
|
if len(keyval) == 1 or keyval[1] == "true":
|
||||||
value = True
|
value = True
|
||||||
|
@ -401,7 +401,7 @@ def parse_example_config(known_args, config):
|
||||||
top_level_keys = []
|
top_level_keys = []
|
||||||
|
|
||||||
for line in open(rust_dir + '/config.example.toml').read().split("\n"):
|
for line in open(rust_dir + '/config.example.toml').read().split("\n"):
|
||||||
if cur_section == None:
|
if cur_section is None:
|
||||||
if line.count('=') == 1:
|
if line.count('=') == 1:
|
||||||
top_level_key = line.split('=')[0]
|
top_level_key = line.split('=')[0]
|
||||||
top_level_key = top_level_key.strip(' #')
|
top_level_key = top_level_key.strip(' #')
|
||||||
|
@ -523,8 +523,8 @@ def write_uncommented(target, f):
|
||||||
block.append(line)
|
block.append(line)
|
||||||
if len(line) == 0:
|
if len(line) == 0:
|
||||||
if not is_comment:
|
if not is_comment:
|
||||||
for l in block:
|
for ln in block:
|
||||||
f.write(l + "\n")
|
f.write(ln + "\n")
|
||||||
block = []
|
block = []
|
||||||
is_comment = True
|
is_comment = True
|
||||||
continue
|
continue
|
||||||
|
|
0
src/ci/cpu-usage-over-time.py
Normal file → Executable file
0
src/ci/cpu-usage-over-time.py
Normal file → Executable file
0
src/ci/docker/host-x86_64/test-various/uefi_qemu_test/run.py
Normal file → Executable file
0
src/ci/docker/host-x86_64/test-various/uefi_qemu_test/run.py
Normal file → Executable file
|
@ -2,6 +2,14 @@
|
||||||
# Simpler reimplementation of Android's sdkmanager
|
# Simpler reimplementation of Android's sdkmanager
|
||||||
# Extra features of this implementation are pinning and mirroring
|
# Extra features of this implementation are pinning and mirroring
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import tempfile
|
||||||
|
import urllib.request
|
||||||
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
# These URLs are the Google repositories containing the list of available
|
# These URLs are the Google repositories containing the list of available
|
||||||
# packages and their versions. The list has been generated by listing the URLs
|
# packages and their versions. The list has been generated by listing the URLs
|
||||||
# fetched while executing `tools/bin/sdkmanager --list`
|
# fetched while executing `tools/bin/sdkmanager --list`
|
||||||
|
@ -27,15 +35,6 @@ MIRROR_BUCKET = "rust-lang-ci-mirrors"
|
||||||
MIRROR_BUCKET_REGION = "us-west-1"
|
MIRROR_BUCKET_REGION = "us-west-1"
|
||||||
MIRROR_BASE_DIR = "rustc/android/"
|
MIRROR_BASE_DIR = "rustc/android/"
|
||||||
|
|
||||||
import argparse
|
|
||||||
import hashlib
|
|
||||||
import os
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import tempfile
|
|
||||||
import urllib.request
|
|
||||||
import xml.etree.ElementTree as ET
|
|
||||||
|
|
||||||
class Package:
|
class Package:
|
||||||
def __init__(self, path, url, sha1, deps=None):
|
def __init__(self, path, url, sha1, deps=None):
|
||||||
if deps is None:
|
if deps is None:
|
||||||
|
|
|
@ -568,8 +568,8 @@ class TestEnvironment:
|
||||||
env_vars += f'\n "{var_name}={var_value}",'
|
env_vars += f'\n "{var_name}={var_value}",'
|
||||||
|
|
||||||
# Default to no backtrace for test suite
|
# Default to no backtrace for test suite
|
||||||
if os.getenv("RUST_BACKTRACE") == None:
|
if os.getenv("RUST_BACKTRACE") is None:
|
||||||
env_vars += f'\n "RUST_BACKTRACE=0",'
|
env_vars += '\n "RUST_BACKTRACE=0",'
|
||||||
|
|
||||||
cml.write(
|
cml.write(
|
||||||
self.CML_TEMPLATE.format(env_vars=env_vars, exe_name=exe_name)
|
self.CML_TEMPLATE.format(env_vars=env_vars, exe_name=exe_name)
|
||||||
|
|
4
src/ci/stage-build.py
Normal file → Executable file
4
src/ci/stage-build.py
Normal file → Executable file
|
@ -440,7 +440,7 @@ def retry_action(action, name: str, max_fails: int = 5):
|
||||||
try:
|
try:
|
||||||
action()
|
action()
|
||||||
return
|
return
|
||||||
except:
|
except BaseException: # also catch ctrl+c/sysexit
|
||||||
LOGGER.error(f"Action `{name}` has failed\n{traceback.format_exc()}")
|
LOGGER.error(f"Action `{name}` has failed\n{traceback.format_exc()}")
|
||||||
|
|
||||||
raise Exception(f"Action `{name}` has failed after {max_fails} attempts")
|
raise Exception(f"Action `{name}` has failed after {max_fails} attempts")
|
||||||
|
@ -818,7 +818,7 @@ def run_tests(pipeline: Pipeline):
|
||||||
# Extract rustc, libstd, cargo and src archives to create the optimized sysroot
|
# Extract rustc, libstd, cargo and src archives to create the optimized sysroot
|
||||||
rustc_dir = extract_dist_dir(f"rustc-nightly-{PGO_HOST}") / "rustc"
|
rustc_dir = extract_dist_dir(f"rustc-nightly-{PGO_HOST}") / "rustc"
|
||||||
libstd_dir = extract_dist_dir(f"rust-std-nightly-{PGO_HOST}") / f"rust-std-{PGO_HOST}"
|
libstd_dir = extract_dist_dir(f"rust-std-nightly-{PGO_HOST}") / f"rust-std-{PGO_HOST}"
|
||||||
cargo_dir = extract_dist_dir(f"cargo-nightly-{PGO_HOST}") / f"cargo"
|
cargo_dir = extract_dist_dir(f"cargo-nightly-{PGO_HOST}") / "cargo"
|
||||||
extracted_src_dir = extract_dist_dir("rust-src-nightly") / "rust-src"
|
extracted_src_dir = extract_dist_dir("rust-src-nightly") / "rust-src"
|
||||||
|
|
||||||
# We need to manually copy libstd to the extracted rustc sysroot
|
# We need to manually copy libstd to the extracted rustc sysroot
|
||||||
|
|
4
src/etc/dec2flt_table.py
Normal file → Executable file
4
src/etc/dec2flt_table.py
Normal file → Executable file
|
@ -14,8 +14,7 @@ Adapted from Daniel Lemire's fast_float ``table_generation.py``,
|
||||||
available here: <https://github.com/fastfloat/fast_float/blob/main/script/table_generation.py>.
|
available here: <https://github.com/fastfloat/fast_float/blob/main/script/table_generation.py>.
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from math import ceil, floor, log, log2
|
from math import ceil, floor, log
|
||||||
from fractions import Fraction
|
|
||||||
from collections import deque
|
from collections import deque
|
||||||
|
|
||||||
HEADER = """
|
HEADER = """
|
||||||
|
@ -97,7 +96,6 @@ def print_proper_powers(min_exp, max_exp, bias):
|
||||||
print('#[rustfmt::skip]')
|
print('#[rustfmt::skip]')
|
||||||
typ = '[(u64, u64); N_POWERS_OF_FIVE]'
|
typ = '[(u64, u64); N_POWERS_OF_FIVE]'
|
||||||
print('pub static POWER_OF_FIVE_128: {} = ['.format(typ))
|
print('pub static POWER_OF_FIVE_128: {} = ['.format(typ))
|
||||||
lo_mask = (1 << 64) - 1
|
|
||||||
for c, exp in powers:
|
for c, exp in powers:
|
||||||
hi = '0x{:x}'.format(c // (1 << 64))
|
hi = '0x{:x}'.format(c // (1 << 64))
|
||||||
lo = '0x{:x}'.format(c % (1 << 64))
|
lo = '0x{:x}'.format(c % (1 << 64))
|
||||||
|
|
|
@ -4,6 +4,7 @@ from os import path
|
||||||
self_dir = path.dirname(path.realpath(__file__))
|
self_dir = path.dirname(path.realpath(__file__))
|
||||||
sys.path.append(self_dir)
|
sys.path.append(self_dir)
|
||||||
|
|
||||||
|
# ruff: noqa: E402
|
||||||
import gdb
|
import gdb
|
||||||
import gdb_lookup
|
import gdb_lookup
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,9 @@ for (trait, supers, errs) in [('Clone', [], 1),
|
||||||
traits[trait] = (ALL, supers, errs)
|
traits[trait] = (ALL, supers, errs)
|
||||||
|
|
||||||
for (trait, (types, super_traits, error_count)) in traits.items():
|
for (trait, (types, super_traits, error_count)) in traits.items():
|
||||||
mk = lambda ty: create_test_case(ty, trait, super_traits, error_count)
|
def mk(ty, t=trait, st=super_traits, ec=error_count):
|
||||||
|
return create_test_case(ty, t, st, ec)
|
||||||
|
|
||||||
if types & ENUM:
|
if types & ENUM:
|
||||||
write_file(trait + '-enum', mk(ENUM_TUPLE))
|
write_file(trait + '-enum', mk(ENUM_TUPLE))
|
||||||
write_file(trait + '-enum-struct-variant', mk(ENUM_STRUCT))
|
write_file(trait + '-enum-struct-variant', mk(ENUM_STRUCT))
|
||||||
|
|
8
src/etc/htmldocck.py
Normal file → Executable file
8
src/etc/htmldocck.py
Normal file → Executable file
|
@ -144,7 +144,7 @@ VOID_ELEMENTS = {'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'ke
|
||||||
|
|
||||||
# Python 2 -> 3 compatibility
|
# Python 2 -> 3 compatibility
|
||||||
try:
|
try:
|
||||||
unichr
|
unichr # noqa: B018 FIXME: py2
|
||||||
except NameError:
|
except NameError:
|
||||||
unichr = chr
|
unichr = chr
|
||||||
|
|
||||||
|
@ -348,7 +348,9 @@ class CachedFiles(object):
|
||||||
try:
|
try:
|
||||||
tree = ET.fromstringlist(f.readlines(), CustomHTMLParser())
|
tree = ET.fromstringlist(f.readlines(), CustomHTMLParser())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise RuntimeError('Cannot parse an HTML file {!r}: {}'.format(path, e))
|
raise RuntimeError( # noqa: B904 FIXME: py2
|
||||||
|
'Cannot parse an HTML file {!r}: {}'.format(path, e)
|
||||||
|
)
|
||||||
self.trees[path] = tree
|
self.trees[path] = tree
|
||||||
return self.trees[path]
|
return self.trees[path]
|
||||||
|
|
||||||
|
@ -422,7 +424,7 @@ def check_snapshot(snapshot_name, actual_tree, normalize_to_text):
|
||||||
if bless:
|
if bless:
|
||||||
expected_str = None
|
expected_str = None
|
||||||
else:
|
else:
|
||||||
raise FailedCheck('No saved snapshot value')
|
raise FailedCheck('No saved snapshot value') # noqa: B904 FIXME: py2
|
||||||
|
|
||||||
if not normalize_to_text:
|
if not normalize_to_text:
|
||||||
actual_str = ET.tostring(actual_tree).decode('utf-8')
|
actual_str = ET.tostring(actual_tree).decode('utf-8')
|
||||||
|
|
|
@ -124,7 +124,7 @@ def start_breakpoint_listener(target):
|
||||||
breakpoint = lldb.SBBreakpoint.GetBreakpointFromEvent(event)
|
breakpoint = lldb.SBBreakpoint.GetBreakpointFromEvent(event)
|
||||||
print_debug("breakpoint added, id = " + str(breakpoint.id))
|
print_debug("breakpoint added, id = " + str(breakpoint.id))
|
||||||
new_breakpoints.append(breakpoint.id)
|
new_breakpoints.append(breakpoint.id)
|
||||||
except:
|
except BaseException: # explicitly catch ctrl+c/sysexit
|
||||||
print_debug("breakpoint listener shutting down")
|
print_debug("breakpoint listener shutting down")
|
||||||
|
|
||||||
# Start the listener and let it run as a daemon
|
# Start the listener and let it run as a daemon
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from lldb import SBValue, SBData, SBError, eBasicTypeLong, eBasicTypeUnsignedLong, \
|
from lldb import SBData, SBError, eBasicTypeLong, eBasicTypeUnsignedLong, \
|
||||||
eBasicTypeUnsignedChar
|
eBasicTypeUnsignedChar
|
||||||
|
|
||||||
# from lldb.formatters import Logger
|
# from lldb.formatters import Logger
|
||||||
|
|
0
src/etc/test-float-parse/runtests.py
Normal file → Executable file
0
src/etc/test-float-parse/runtests.py
Normal file → Executable file
|
@ -5,7 +5,11 @@ Assumes the `MIRI_SYSROOT` env var to be set appropriately,
|
||||||
and the working directory to contain the cargo-miri-test project.
|
and the working directory to contain the cargo-miri-test project.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import sys, subprocess, os, re, difflib
|
import difflib
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
|
||||||
CGREEN = '\33[32m'
|
CGREEN = '\33[32m'
|
||||||
CBOLD = '\33[1m'
|
CBOLD = '\33[1m'
|
||||||
|
@ -46,7 +50,9 @@ def check_output(actual, path, name):
|
||||||
print(f"--- END diff {name} ---")
|
print(f"--- END diff {name} ---")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def test(name, cmd, stdout_ref, stderr_ref, stdin=b'', env={}):
|
def test(name, cmd, stdout_ref, stderr_ref, stdin=b'', env=None):
|
||||||
|
if env is None:
|
||||||
|
env = {}
|
||||||
print("Testing {}...".format(name))
|
print("Testing {}...".format(name))
|
||||||
## Call `cargo miri`, capture all output
|
## Call `cargo miri`, capture all output
|
||||||
p_env = os.environ.copy()
|
p_env = os.environ.copy()
|
||||||
|
@ -70,7 +76,9 @@ def test(name, cmd, stdout_ref, stderr_ref, stdin=b'', env={}):
|
||||||
return
|
return
|
||||||
fail("exit code was {}".format(p.returncode))
|
fail("exit code was {}".format(p.returncode))
|
||||||
|
|
||||||
def test_no_rebuild(name, cmd, env={}):
|
def test_no_rebuild(name, cmd, env=None):
|
||||||
|
if env is None:
|
||||||
|
env = {}
|
||||||
print("Testing {}...".format(name))
|
print("Testing {}...".format(name))
|
||||||
p_env = os.environ.copy()
|
p_env = os.environ.copy()
|
||||||
p_env.update(env)
|
p_env.update(env)
|
||||||
|
@ -84,13 +92,13 @@ def test_no_rebuild(name, cmd, env={}):
|
||||||
stdout = stdout.decode("UTF-8")
|
stdout = stdout.decode("UTF-8")
|
||||||
stderr = stderr.decode("UTF-8")
|
stderr = stderr.decode("UTF-8")
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
fail("rebuild failed");
|
fail("rebuild failed")
|
||||||
# Also check for 'Running' as a sanity check.
|
# Also check for 'Running' as a sanity check.
|
||||||
if stderr.count(" Compiling ") > 0 or stderr.count(" Running ") == 0:
|
if stderr.count(" Compiling ") > 0 or stderr.count(" Running ") == 0:
|
||||||
print("--- BEGIN stderr ---")
|
print("--- BEGIN stderr ---")
|
||||||
print(stderr, end="")
|
print(stderr, end="")
|
||||||
print("--- END stderr ---")
|
print("--- END stderr ---")
|
||||||
fail("Something was being rebuilt when it should not be (or we got no output)");
|
fail("Something was being rebuilt when it should not be (or we got no output)")
|
||||||
|
|
||||||
def test_cargo_miri_run():
|
def test_cargo_miri_run():
|
||||||
test("`cargo miri run` (no isolation)",
|
test("`cargo miri run` (no isolation)",
|
||||||
|
|
|
@ -22,7 +22,7 @@ except ImportError:
|
||||||
import urllib.request as urllib2
|
import urllib.request as urllib2
|
||||||
from urllib.error import HTTPError
|
from urllib.error import HTTPError
|
||||||
try:
|
try:
|
||||||
import typing
|
import typing # noqa: F401 FIXME: py2
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -152,8 +152,8 @@ def update_latest(
|
||||||
latest = json.load(f, object_pairs_hook=collections.OrderedDict)
|
latest = json.load(f, object_pairs_hook=collections.OrderedDict)
|
||||||
|
|
||||||
current_status = {
|
current_status = {
|
||||||
os: read_current_status(current_commit, 'history/' + os + '.tsv')
|
os_: read_current_status(current_commit, 'history/' + os_ + '.tsv')
|
||||||
for os in ['windows', 'linux']
|
for os_ in ['windows', 'linux']
|
||||||
}
|
}
|
||||||
|
|
||||||
slug = 'rust-lang/rust'
|
slug = 'rust-lang/rust'
|
||||||
|
@ -170,10 +170,10 @@ def update_latest(
|
||||||
changed = False
|
changed = False
|
||||||
create_issue_for_status = None # set to the status that caused the issue
|
create_issue_for_status = None # set to the status that caused the issue
|
||||||
|
|
||||||
for os, s in current_status.items():
|
for os_, s in current_status.items():
|
||||||
old = status[os]
|
old = status[os_]
|
||||||
new = s.get(tool, old)
|
new = s.get(tool, old)
|
||||||
status[os] = new
|
status[os_] = new
|
||||||
maintainers = ' '.join('@'+name for name in MAINTAINERS.get(tool, ()))
|
maintainers = ' '.join('@'+name for name in MAINTAINERS.get(tool, ()))
|
||||||
# comparing the strings, but they are ordered appropriately:
|
# comparing the strings, but they are ordered appropriately:
|
||||||
# "test-pass" > "test-fail" > "build-fail"
|
# "test-pass" > "test-fail" > "build-fail"
|
||||||
|
@ -181,12 +181,12 @@ def update_latest(
|
||||||
# things got fixed or at least the status quo improved
|
# things got fixed or at least the status quo improved
|
||||||
changed = True
|
changed = True
|
||||||
message += '🎉 {} on {}: {} → {} (cc {}).\n' \
|
message += '🎉 {} on {}: {} → {} (cc {}).\n' \
|
||||||
.format(tool, os, old, new, maintainers)
|
.format(tool, os_, old, new, maintainers)
|
||||||
elif new < old:
|
elif new < old:
|
||||||
# tests or builds are failing and were not failing before
|
# tests or builds are failing and were not failing before
|
||||||
changed = True
|
changed = True
|
||||||
title = '💔 {} on {}: {} → {}' \
|
title = '💔 {} on {}: {} → {}' \
|
||||||
.format(tool, os, old, new)
|
.format(tool, os_, old, new)
|
||||||
message += '{} (cc {}).\n' \
|
message += '{} (cc {}).\n' \
|
||||||
.format(title, maintainers)
|
.format(title, maintainers)
|
||||||
# See if we need to create an issue.
|
# See if we need to create an issue.
|
||||||
|
|
0
tests/run-make/coverage-reports/sort_subviews.py
Normal file → Executable file
0
tests/run-make/coverage-reports/sort_subviews.py
Normal file → Executable file
|
@ -7,6 +7,6 @@ import xml.etree.ElementTree as ET
|
||||||
for line in sys.stdin:
|
for line in sys.stdin:
|
||||||
try:
|
try:
|
||||||
ET.fromstring(line)
|
ET.fromstring(line)
|
||||||
except ET.ParseError as pe:
|
except ET.ParseError:
|
||||||
print("Invalid xml: %r" % line)
|
print("Invalid xml: %r" % line)
|
||||||
raise
|
raise
|
||||||
|
|
|
@ -6,7 +6,7 @@ import json
|
||||||
|
|
||||||
|
|
||||||
def find_redirect_map_file(folder, errors):
|
def find_redirect_map_file(folder, errors):
|
||||||
for root, dirs, files in os.walk(folder):
|
for root, _dirs, files in os.walk(folder):
|
||||||
for name in files:
|
for name in files:
|
||||||
if not name.endswith("redirect-map.json"):
|
if not name.endswith("redirect-map.json"):
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -46,7 +46,7 @@ def check_lib(lib):
|
||||||
'--target', os.environ['TARGET'],
|
'--target', os.environ['TARGET'],
|
||||||
'--extern', '{}={}'.format(lib['name'], lib['path'])],
|
'--extern', '{}={}'.format(lib['name'], lib['path'])],
|
||||||
to_input=('extern crate {};'.format(lib['name'])).encode('utf-8'))
|
to_input=('extern crate {};'.format(lib['name'])).encode('utf-8'))
|
||||||
if not 'use of unstable library feature' in '{}{}'.format(stdout, stderr):
|
if 'use of unstable library feature' not in '{}{}'.format(stdout, stderr):
|
||||||
print('crate {} "{}" is not unstable'.format(lib['name'], lib['path']))
|
print('crate {} "{}" is not unstable'.format(lib['name'], lib['path']))
|
||||||
print('{}{}'.format(stdout, stderr))
|
print('{}{}'.format(stdout, stderr))
|
||||||
print('')
|
print('')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue