From 2adb44a402e9f9d9f98554d91180a70daea302a3 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 27 Sep 2018 15:49:02 +1000 Subject: [PATCH] chore: remove unused files to simply out_dir replacements --- docs/development/upgrading-chromium.md | 2 +- script/dump-symbols.py | 4 +- script/rebuild-test-modules.py | 66 -------------------------- spec/api-notification-dbus-spec.js | 2 +- spec/api-power-monitor-spec.js | 2 +- 5 files changed, 5 insertions(+), 71 deletions(-) delete mode 100755 script/rebuild-test-modules.py diff --git a/docs/development/upgrading-chromium.md b/docs/development/upgrading-chromium.md index 0f6fb66d7f6a..15edfe0bdbbf 100644 --- a/docs/development/upgrading-chromium.md +++ b/docs/development/upgrading-chromium.md @@ -97,7 +97,7 @@ This is an overview of the steps needed to upgrade Chromium in Electron. - Add more build flags to disable features in build-time. When a Debug build of Electron succeeds, run the tests: -`$ ./script/test.py` +`$ npm run tst` Fix the failing tests. Follow all the steps above to fix Electron code on all supported platforms. diff --git a/script/dump-symbols.py b/script/dump-symbols.py index 7339692b387d..f8f4597d31fe 100755 --- a/script/dump-symbols.py +++ b/script/dump-symbols.py @@ -5,11 +5,11 @@ import os import sys from lib.config import PLATFORM, enable_verbose_mode, is_verbose_mode -from lib.util import get_electron_branding, execute, rm_rf +from lib.util import get_electron_branding, execute, rm_rf, get_out_dir ELECTRON_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SOURCE_ROOT = os.path.abspath(os.path.dirname(ELECTRON_ROOT)) -RELEASE_PATH = os.path.join('out', 'Default') +RELEASE_PATH = get_out_dir() def main(): args = parse_args() diff --git a/script/rebuild-test-modules.py b/script/rebuild-test-modules.py deleted file mode 100755 index abf1800e33ce..000000000000 --- a/script/rebuild-test-modules.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env python - -import argparse -import os -import shutil -import subprocess -import sys - -from lib.config import PLATFORM, enable_verbose_mode, get_target_arch -from lib.util import execute_stdout, get_electron_version, safe_mkdir, \ - update_node_modules, update_electron_modules - - -SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) - - -def main(): - os.chdir(SOURCE_ROOT) - - args = parse_args() - config = args.configuration - - if args.verbose: - enable_verbose_mode() - - spec_modules = os.path.join(SOURCE_ROOT, 'spec', 'node_modules') - out_dir = os.path.join(SOURCE_ROOT, 'out', config) - version = get_electron_version() - node_dir = os.path.join(out_dir, 'node-{0}'.format(version)) - - # Create node headers - script_path = os.path.join(SOURCE_ROOT, 'script', 'create-node-headers.py') - execute_stdout([sys.executable, script_path, '--version', version, - '--directory', out_dir]) - - if PLATFORM == 'win32': - lib_dir = os.path.join(node_dir, 'Release') - safe_mkdir(lib_dir) - iojs_lib = os.path.join(lib_dir, 'iojs.lib') - atom_lib = os.path.join(out_dir, 'node.dll.lib') - shutil.copy2(atom_lib, iojs_lib) - node_lib = os.path.join(lib_dir, 'node.lib') - shutil.copy2(atom_lib, node_lib) - - # Native modules can only be compiled against release builds on Windows - if config[0] == 'R' or PLATFORM != 'win32': - update_electron_modules(os.path.dirname(spec_modules), get_target_arch(), - node_dir) - else: - update_node_modules(os.path.dirname(spec_modules)) - - -def parse_args(): - parser = argparse.ArgumentParser(description='Rebuild native test modules') - parser.add_argument('-v', '--verbose', - action='store_true', - help='Prints the output of the subprocesses') - parser.add_argument('-c', '--configuration', - help='Build configuration to rebuild modules against', - default='D', - required=False) - return parser.parse_args() - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/spec/api-notification-dbus-spec.js b/spec/api-notification-dbus-spec.js index beb3748b64f6..4046898367e2 100644 --- a/spec/api-notification-dbus-spec.js +++ b/spec/api-notification-dbus-spec.js @@ -2,7 +2,7 @@ // with the session bus. This requires python-dbusmock to be installed and // running at $DBUS_SESSION_BUS_ADDRESS. // -// script/test.py spawns dbusmock, which sets DBUS_SESSION_BUS_ADDRESS. +// script/spec-runner.js spawns dbusmock, which sets DBUS_SESSION_BUS_ADDRESS. // // See https://pypi.python.org/pypi/python-dbusmock to read about dbusmock. diff --git a/spec/api-power-monitor-spec.js b/spec/api-power-monitor-spec.js index 3558d9bcb438..60401d5bccaa 100644 --- a/spec/api-power-monitor-spec.js +++ b/spec/api-power-monitor-spec.js @@ -1,7 +1,7 @@ // For these tests we use a fake DBus daemon to verify powerMonitor module // interaction with the system bus. This requires python-dbusmock installed and // running (with the DBUS_SYSTEM_BUS_ADDRESS environment variable set). -// script/test.py will take care of spawning the fake DBus daemon and setting +// script/spec-runner.js will take care of spawning the fake DBus daemon and setting // DBUS_SYSTEM_BUS_ADDRESS when python-dbusmock is installed. // // See https://pypi.python.org/pypi/python-dbusmock for more information about