mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 23:07:33 +09:00
nss: update nss to hg rev e5e10a46b9ad with vc2013 hackfix
This commit is contained in:
parent
ed1b356dfa
commit
dcdc5d70e0
133 changed files with 8084 additions and 2038 deletions
|
|
@ -39,18 +39,16 @@ def run_tests(test, cycles="standard", env={}, silent=False):
|
|||
subprocess.check_call(command, env=os_env, stdout=stdout, stderr=stderr)
|
||||
|
||||
class cfAction(argparse.Action):
|
||||
docker_command = ["docker"]
|
||||
docker_command = None
|
||||
restorecon = None
|
||||
|
||||
def __call__(self, parser, args, values, option_string=None):
|
||||
if not args.noroot:
|
||||
self.setDockerCommand()
|
||||
self.setDockerCommand(args)
|
||||
|
||||
if values:
|
||||
files = [os.path.relpath(os.path.abspath(x), start=cwd) for x in values]
|
||||
else:
|
||||
files = self.modifiedFiles()
|
||||
files = [os.path.join('/home/worker/nss', x) for x in files]
|
||||
|
||||
# First check if we can run docker.
|
||||
try:
|
||||
|
|
@ -58,9 +56,16 @@ class cfAction(argparse.Action):
|
|||
subprocess.check_call(
|
||||
self.docker_command + ["images"], stdout=f)
|
||||
except:
|
||||
print("Please install docker and start the docker daemon.")
|
||||
sys.exit(1)
|
||||
self.docker_command = None
|
||||
|
||||
if self.docker_command is None:
|
||||
print("warning: running clang-format directly, which isn't guaranteed to be correct")
|
||||
command = [cwd + "/automation/clang-format/run_clang_format.sh"] + files
|
||||
repr(command)
|
||||
subprocess.call(command)
|
||||
return
|
||||
|
||||
files = [os.path.join('/home/worker/nss', x) for x in files]
|
||||
docker_image = 'clang-format-service:latest'
|
||||
cf_docker_folder = cwd + "/automation/clang-format"
|
||||
|
||||
|
|
@ -113,11 +118,17 @@ class cfAction(argparse.Action):
|
|||
subprocess.check_call(command)
|
||||
return
|
||||
|
||||
def setDockerCommand(self):
|
||||
def setDockerCommand(self, args):
|
||||
from distutils.spawn import find_executable
|
||||
if platform.system() == "Linux":
|
||||
from distutils.spawn import find_executable
|
||||
self.restorecon = find_executable('restorecon')
|
||||
self.docker_command = ["sudo"] + self.docker_command
|
||||
self.restorecon = find_executable("restorecon")
|
||||
dcmd = find_executable("docker")
|
||||
if dcmd is not None:
|
||||
self.docker_command = [dcmd]
|
||||
if not args.noroot:
|
||||
self.docker_command = ["sudo"] + self.docker_command
|
||||
else:
|
||||
self.docker_command = None
|
||||
|
||||
def modifiedFiles(self):
|
||||
files = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue