Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: remove unused python code #37357

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions script/lib/config.py
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions script/lib/native_tests.py
Expand Up @@ -121,11 +121,6 @@ def run(self, binaries, output_dir=None, verbosity=Verbosity.CHATTY,
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,
Expand Down
15 changes: 0 additions & 15 deletions script/lib/util.py
Expand Up @@ -25,12 +25,9 @@ def is_verbose_mode():
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()
Expand All @@ -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:
Expand Down