Disable test_isolation_mode, glib, and x11 in GYP_DEFINES
This removes unnecessary library dependencies. Change-Id: Id451766d1bedd7fbcd9cf9cf882de86ccb662486
This commit is contained in:
parent
b9f1996b68
commit
374324b042
|
@ -14,12 +14,12 @@
|
|||
# 1. Setup gyp: ./gyp_packager.py
|
||||
#
|
||||
# clang is not enabled by default, which can be enabled by overriding
|
||||
# GYP_DEFINE environment variable, i.e. "GYP_DEFINES='clang=1
|
||||
# use_openssl=1' ./gyp_packager.py".
|
||||
# GYP_DEFINE environment variable, i.e.
|
||||
# "GYP_DEFINES='clang=1' ./gyp_packager.py".
|
||||
#
|
||||
# Ninja is the default build system. User can also change to make by
|
||||
# overriding GYP_GENERATORS to make, i.e. "GYP_GENERATORS='make'
|
||||
# ./gyp_packager.py".
|
||||
# overriding GYP_GENERATORS to make, i.e.
|
||||
# "GYP_GENERATORS='make' ./gyp_packager.py".
|
||||
#
|
||||
# 2. The first step generates the make files but does not start the
|
||||
# build process. Ninja is the default build system. Refer to Ninja
|
||||
|
@ -59,9 +59,16 @@ if __name__ == '__main__':
|
|||
# Gyp should run from current directory.
|
||||
args.append('--depth=.')
|
||||
|
||||
# Set GYP_DEFINES if it is not explicitly set yet.
|
||||
if not os.environ.get('GYP_DEFINES'):
|
||||
os.environ['GYP_DEFINES'] = 'use_openssl=1'
|
||||
# Set these default GYP_DEFINES if user does not set the value explicitly.
|
||||
_DEFAULT_DEFINES = {"test_isolation_mode" : "noop", "use_glib" : 0,
|
||||
"use_openssl" : 1, "use_x11" : 0}
|
||||
|
||||
gyp_defines = (os.environ['GYP_DEFINES'] if os.environ.get('GYP_DEFINES')
|
||||
else "")
|
||||
for key in _DEFAULT_DEFINES:
|
||||
if key not in gyp_defines:
|
||||
gyp_defines += " {}={}".format(key, _DEFAULT_DEFINES[key])
|
||||
os.environ['GYP_DEFINES'] = gyp_defines.strip()
|
||||
|
||||
# There shouldn't be a circular dependency relationship between .gyp files,
|
||||
# but in Chromium's .gyp files, on non-Mac platforms, circular relationships
|
||||
|
|
|
@ -38,9 +38,9 @@
|
|||
],
|
||||
'dependencies': [
|
||||
'../../base/base.gyp:base',
|
||||
'../../base/base.gyp:run_all_unittests',
|
||||
'../../mpd/mpd.gyp:media_info_proto',
|
||||
'../../testing/gtest.gyp:gtest',
|
||||
'../../testing/gtest.gyp:gtest_main',
|
||||
# Depends on full protobuf to read/write with TextFormat.
|
||||
'../../third_party/protobuf/protobuf.gyp:protobuf_full_do_not_use',
|
||||
'../file/file.gyp:file',
|
||||
|
|
|
@ -12,16 +12,25 @@
|
|||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'media_test_support',
|
||||
'target_name': 'run_all_unittests',
|
||||
'type': '<(component)',
|
||||
'sources': [
|
||||
'run_tests_with_atexit_manager.cc',
|
||||
],
|
||||
'dependencies': [
|
||||
'../../testing/gtest.gyp:gtest',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'media_test_support',
|
||||
'type': '<(component)',
|
||||
'sources': [
|
||||
'test_data_util.cc',
|
||||
'test_data_util.h',
|
||||
],
|
||||
'dependencies': [
|
||||
'../../base/base.gyp:base',
|
||||
'../../testing/gtest.gyp:gtest',
|
||||
'run_all_unittests',
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
|
@ -68,8 +68,8 @@
|
|||
],
|
||||
'dependencies': [
|
||||
'../base/base.gyp:base',
|
||||
'../base/base.gyp:run_all_unittests',
|
||||
'../media/file/file.gyp:file',
|
||||
'../media/test/media_test.gyp:run_all_unittests',
|
||||
'../testing/gtest.gyp:gtest',
|
||||
'mpd_builder',
|
||||
'mpd_util',
|
||||
|
|
Loading…
Reference in New Issue