Skip to content

Commit

Permalink
build: remove unused python code (electron#37351)
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere authored and gecko19 committed Feb 28, 2023
1 parent d9c303e commit 96a8dc4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
4 changes: 0 additions & 4 deletions script/lib/config.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 96a8dc4

Please sign in to comment.