build: remove unused python code (#37351)
This commit is contained in:
parent
872d1fe05a
commit
ee966ad6ec
3 changed files with 0 additions and 24 deletions
|
@ -30,10 +30,6 @@ def get_target_arch():
|
|||
return arch
|
||||
|
||||
|
||||
def get_env_var(name):
|
||||
return os.environ.get('ELECTRON_' + name, '')
|
||||
|
||||
|
||||
def enable_verbose_mode():
|
||||
print('Running in verbose mode')
|
||||
global verbose_mode
|
||||
|
|
|
@ -121,11 +121,6 @@ class TestsList():
|
|||
for binary in binaries])
|
||||
return suite_returncode
|
||||
|
||||
def run_only(self, binary_name, output_dir=None, verbosity=Verbosity.CHATTY,
|
||||
disabled_tests_policy=DisabledTestsPolicy.DISABLE):
|
||||
return self.run([binary_name], output_dir, verbosity,
|
||||
disabled_tests_policy)
|
||||
|
||||
def run_all(self, output_dir=None, verbosity=Verbosity.CHATTY,
|
||||
disabled_tests_policy=DisabledTestsPolicy.DISABLE):
|
||||
return self.run(self.get_for_current_platform(), output_dir, verbosity,
|
||||
|
|
|
@ -25,12 +25,9 @@ ELECTRON_DIR = os.path.abspath(
|
|||
TS_NODE = os.path.join(ELECTRON_DIR, 'node_modules', '.bin', 'ts-node')
|
||||
SRC_DIR = os.path.abspath(os.path.join(__file__, '..', '..', '..', '..'))
|
||||
|
||||
NPM = 'npm'
|
||||
if sys.platform in ['win32', 'cygwin']:
|
||||
NPM += '.cmd'
|
||||
TS_NODE += '.cmd'
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def scoped_cwd(path):
|
||||
cwd = os.getcwd()
|
||||
|
@ -41,18 +38,6 @@ def scoped_cwd(path):
|
|||
os.chdir(cwd)
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def scoped_env(key, value):
|
||||
origin = ''
|
||||
if key in os.environ:
|
||||
origin = os.environ[key]
|
||||
os.environ[key] = value
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
os.environ[key] = origin
|
||||
|
||||
|
||||
def download(text, url, path):
|
||||
safe_mkdir(os.path.dirname(path))
|
||||
with open(path, 'wb') as local_file:
|
||||
|
|
Loading…
Reference in a new issue