# Copyright 2015 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Wraps os, os.path and shutil functions to work around MAX_PATH on Windows.""" import inspect import os import re import shutil import subprocess import sys from utils import tools tools.force_local_third_party() # third_party/ import six from six.moves import builtins if sys.platform == 'win32': import ctypes from ctypes import wintypes from ctypes.wintypes import windll CreateSymbolicLinkW = windll.kernel32.CreateSymbolicLinkW CreateSymbolicLinkW.argtypes = ( wintypes.LPCWSTR, wintypes.LPCWSTR, wintypes.DWORD) CreateSymbolicLinkW.restype = wintypes.BOOL DeleteFile = windll.kernel32.DeleteFileW
# that can be found in the LICENSE file. import json import os import sys import unittest import StringIO ROOT_DIR = os.path.dirname(os.path.abspath(os.path.join( __file__.decode(sys.getfilesystemencoding()), os.pardir, os.pardir, os.pardir))) sys.path.insert(0, ROOT_DIR) # pylint: disable=no-name-in-module from utils import tools tools.force_local_third_party(ROOT_DIR) from libs.logdog import stream, streamname, varint class StreamParamsTestCase(unittest.TestCase): def setUp(self): self.params = stream.StreamParams( 'name', type=stream.StreamParams.TEXT, content_type='content-type', tags={ 'foo': 'bar', 'baz': 'qux', })
import json import os import shutil import string import subprocess import sys import tempfile import threading CLIENT_DIR = os.path.dirname( os.path.dirname( os.path.abspath(__file__.decode(sys.getfilesystemencoding())))) sys.path.insert(0, CLIENT_DIR) from utils import tools tools.force_local_third_party(CLIENT_DIR) # third_party/ import colorama from chromium import natsort from depot_tools import fix_encoding # pylint: disable=ungrouped-imports import parallel_execution from utils import file_path from utils import tools def get_bot_list(swarming_server, dimensions): """Returns a list of swarming bots: health, quarantined, dead.""" q = '&'.join(