Files
electron/script/verify-ffmpeg.py
Jeremy Apthorp e012801420 feat: upgrade to Chromium 68.0.3440.128 and Node 10.11.0 (#14677)
* Update to Chromium 68.0.3440.128 and Node 10.10.0

* update v8, ffmpeg, chromium, crashpad, boringssl, and webrtc patches

* fix SSL_get_tlsext_status_type patch

* pass encryption_modes_supported to CdmInfo

* kNoSandbox moved into service_manager

* bump CHROME_VERSION_STRING

TODO: automatically pull in the real chrome version

* PathService -> base::PathService

* net::X509Certificate::Equals -> net::X509Certificate::EqualsExcludingChain

* use content::ChildProcessTerminationInfo

* GetHandle() -> GetProcess().Handle()

* ScopedNestableTaskAllower doesn't take an argument

* net::HttpAuthCache::ClearEntriesAddedWithin -> ClearAllEntries

* std::unique_ptr<WebContents>

* blink::WebFullscreenOptions

* OnAudioStateChanged doesn't take a WebContents

* content::RESULT_CODE_NORMAL_EXIT -> service_manager::RESULT_CODE_NORMAL_EXIT

* MessageLoopCurrent

* WasResized -> SynchronizeVisualProperties

* SetTimeStamp takes a base::TimeTicks

* ExecuteScriptInIsolatedWorld is single-script only

* DispatchNonPersistentCloseEvent takes a callback now

* expose URLRequestContextGetter::{Add,Remove}Observer

* test: remove no longer existing Chromium test deps

cc_blink_unittests has been removed in
https://chromium-review.googlesource.com/1053765

mojo_common_unittests has been removed in
https://chromium-review.googlesource.com/1028000

* SetFdLimit -> IncreaseFdLimitTo

NOTE: the behaviour of this API has changed slightly, and we should
mention that in the notes.

* MessageLoop::QuitWhenIdleClosure -> RunLoop::QuitCurrentWhenIdleClosureDeprecated

* certificate_transparency moved out of net/

pending a clearer decision about what to do with CT

in the mean time, copy CreateLogVerifiersForKnownLogs from deleted chromium source

* add secure_origin_whitelist to chrome source list

NOTE: is this something we actually want? cc @deepak1556

* DrainBackgroundTasks -> DrainTasks

* use new node options parser

* fix disable_scroll_begin_dcheck.patch

* ViewsDelegate::CreateWebContents went away

see https://chromium-review.googlesource.com/c/chromium/src/+/1031314

* kZygoteProcess moved into service_manager

* test: minor improvements to the Node spec

 - reformat some parts
 - better failures reporting with `expect`
 - skip some tests instead of marking them as passed

* chromium removed *_posix.cc from the source filters

* test: fix :electron_tests compilation

* better crash diagnostics in ffmpeg test

* fix: enable back a DCHECK in viz::ServerSharedBitmapManager

Fixes #14327.
Backports https://chromium-review.googlesource.com/802574.

* chore: update linux sysroots

* chore: remove obsolete "install-sysroot.py" script

* test: fix frame-subscriber test on Mac

* disable OSR for now

* test: make before-input-event test more robust

* test: make run-as-node --inspect test more robust on windows

* roll node to v10.11.0

* avoid duplicate files when building a zip

* disable failing assert in beginFrameSubscription dirty-rectangle test

* experiment with is_cfi = false

* fix: build torque with x64 toolchain

Co-Authored-By: Alexey Kuzmin <github@alexeykuzmin.com>

* test: disable the "app.relaunch" test on Linux

* chore: bump node to get header tar file

* chore: bump node to fix tar.py line endings
2018-10-04 12:02:14 +10:00

92 lines
3.1 KiB
Python
Executable File

#!/usr/bin/env python
import argparse
import os
import shutil
import subprocess
import sys
from lib.util import get_electron_branding, rm_rf
PROJECT_NAME = get_electron_branding()['project_name']
PRODUCT_NAME = get_electron_branding()['product_name']
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
def main():
args = parse_args()
source_root = os.path.abspath(args.source_root)
initial_app_path = os.path.join(source_root, args.build_dir)
app_path = create_app_copy(initial_app_path)
if sys.platform == 'darwin':
electron = os.path.join(app_path, 'Contents', 'MacOS', PRODUCT_NAME)
ffmpeg_name = 'libffmpeg.dylib'
ffmpeg_app_path = os.path.join(app_path, 'Contents', 'Frameworks',
'{0} Framework.framework'.format(PRODUCT_NAME),
'Libraries')
elif sys.platform == 'win32':
electron = os.path.join(app_path, '{0}.exe'.format(PROJECT_NAME))
ffmpeg_app_path = app_path
ffmpeg_name = 'ffmpeg.dll'
else:
electron = os.path.join(app_path, PROJECT_NAME)
ffmpeg_app_path = app_path
ffmpeg_name = 'libffmpeg.so'
# Copy ffmpeg without proprietary codecs into app.
ffmpeg_lib_path = os.path.join(source_root, args.ffmpeg_path, ffmpeg_name)
shutil.copy(ffmpeg_lib_path, ffmpeg_app_path)
returncode = 0
try:
test_path = os.path.join(SOURCE_ROOT, 'spec', 'fixtures',
'no-proprietary-codecs.js')
env = dict(os.environ)
env['ELECTRON_ENABLE_STACK_DUMPING'] = 'true'
env['ELECTRON_ENABLE_LOGGING'] = 'true'
subprocess.check_call([electron, test_path] + sys.argv[1:], env=env)
except subprocess.CalledProcessError as e:
returncode = e.returncode
except KeyboardInterrupt:
returncode = 0
if returncode == 0:
print 'ok Non proprietary ffmpeg does not contain proprietary codes.'
return returncode
# Create copy of app to install ffmpeg library without proprietary codecs into
def create_app_copy(initial_app_path):
app_path = os.path.join(os.path.dirname(initial_app_path),
os.path.basename(initial_app_path)
+ '-no-proprietary-codecs')
if sys.platform == 'darwin':
app_name = '{0}.app'.format(PRODUCT_NAME)
initial_app_path = os.path.join(initial_app_path, app_name)
app_path = os.path.join(app_path, app_name)
rm_rf(app_path)
shutil.copytree(initial_app_path, app_path, symlinks=True)
return app_path
def parse_args():
parser = argparse.ArgumentParser(description='Test non-proprietary ffmpeg')
parser.add_argument('-b', '--build-dir',
help='Path to an Electron build folder. \
Relative to the --source-root.',
default=None,
required=True)
parser.add_argument('--source-root',
default=SOURCE_ROOT,
required=False)
parser.add_argument('--ffmpeg-path',
help='Path to a folder with a ffmpeg lib. \
Relative to the --source-root.',
default=None,
required=True)
return parser.parse_args()
if __name__ == '__main__':
sys.exit(main())