build: remove unused python code (#37357)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot]
2023-02-21 12:10:38 +01:00
committed by GitHub
parent 38ca7c0860
commit f04ad15b65
3 changed files with 0 additions and 24 deletions

View File

@@ -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

View File

@@ -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,

View File

@@ -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: