mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
test: use shared get_out_dir() in generate_node_headers.py (#50828)
The local get_out_dir() defaulted to 'Testing' instead of 'Default', causing e test to fail when using a non-Testing build config. Replace it with the canonical version from script/lib/util.py.
This commit is contained in:
@@ -8,7 +8,9 @@ from pathlib import Path
|
||||
|
||||
SRC_DIR = Path(__file__).resolve().parents[3]
|
||||
sys.path.append(os.path.join(SRC_DIR, 'third_party/electron_node/tools'))
|
||||
sys.path.append(str(Path(__file__).resolve().parents[1])) # electron/script/
|
||||
|
||||
from lib.util import get_out_dir
|
||||
import install
|
||||
|
||||
class LoadPythonDictionaryError(Exception):
|
||||
@@ -31,13 +33,6 @@ def LoadPythonDictionary(path):
|
||||
)
|
||||
return file_data
|
||||
|
||||
def get_out_dir():
|
||||
out_dir = 'Testing'
|
||||
override = os.environ.get('ELECTRON_OUT_DIR')
|
||||
if override is not None:
|
||||
out_dir = override
|
||||
return os.path.join(SRC_DIR, 'out', out_dir)
|
||||
|
||||
if __name__ == '__main__':
|
||||
node_root_dir = os.path.join(SRC_DIR, 'third_party/electron_node')
|
||||
out = {}
|
||||
|
||||
Reference in New Issue
Block a user