Skip to content

Commit

Permalink
Add support for component=shared_library for base_unittests_run.
Browse files Browse the repository at this point in the history
Specifically, this adds support to run base_unittests isolated
via 'isolate.py run' when built with component build.

This requires rolling icu @ 246118 to get the new icu.isolate.

R=thakis@chromium.org,jshin@chromium.org,frankf@chromium.org,rsleevi@chromium.org
BUG=336439

Review URL: https://codereview.chromium.org/132233030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246247 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
maruel@chromium.org committed Jan 22, 2014
1 parent d2b8e0a commit c9ea791
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ deps = {
"/external/w3c/csswg-test.git@8c415e3215a203fa3a22dbdd1799279fdf44c81e",

"src/third_party/icu":
"/trunk/deps/third_party/icu46@244134",
"/trunk/deps/third_party/icu46@246118",

"src/third_party/libexif/sources":
"/trunk/deps/third_party/libexif/sources@146817",
Expand Down
38 changes: 38 additions & 0 deletions base/base.isolate
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'conditions': [
['OS=="linux" and component=="shared_library"', {
'variables': {
'isolate_dependency_tracked': [
'<(PRODUCT_DIR)/lib/libbase.so',
'<(PRODUCT_DIR)/lib/libbase_i18n.so',
'<(PRODUCT_DIR)/lib/libbase_prefs.so',
],
},
}],
['OS=="mac" and component=="shared_library"', {
'variables': {
'isolate_dependency_tracked': [
'<(PRODUCT_DIR)/libbase.dylib',
'<(PRODUCT_DIR)/libbase_i18n.dylib',
'<(PRODUCT_DIR)/libbase_prefs.dylib',
],
},
}],
['OS=="win" and component=="shared_library"', {
'variables': {
'isolate_dependency_tracked': [
'<(PRODUCT_DIR)/base.dll',
'<(PRODUCT_DIR)/base_i18n.dll',
'<(PRODUCT_DIR)/base_prefs.dll',
],
},
}],
],
'includes': [
'../build/linux/system.isolate',
'../third_party/icu/icu.isolate',
],
}
2 changes: 1 addition & 1 deletion base/base_unittests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
}],
],
'includes': [
'../third_party/icu/icu.isolate',
'base.isolate',
],
}
6 changes: 5 additions & 1 deletion build/android/pylib/gtest/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,14 @@ def _GenerateDepsDirUsingIsolate(suite_name):
'remap',
'--isolate', isolate_abs_path,
'--isolated', isolated_abs_path,
'--outdir', constants.ISOLATE_DEPS_DIR,

'--path-variable', 'PRODUCT_DIR', constants.GetOutDirectory(),

'--config-variable', 'OS', 'android',
'--config-variable', 'component', 'static_library',
'--config-variable', 'icu_use_data_file_flag', '0',
'--outdir', constants.ISOLATE_DEPS_DIR,
'--config-variable', 'use_openssl', '0',
]
assert not cmd_helper.RunCmd(isolate_cmd)

Expand Down
26 changes: 19 additions & 7 deletions build/isolate.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,32 @@
'python',
'<(DEPTH)/tools/swarming_client/isolate.py',
'<(test_isolation_mode)',
'--result', '<@(_outputs)',
'--isolate', '<(RULE_INPUT_PATH)',

# Variables should use the -V FOO=<(FOO) form so frequent values,
# like '0' or '1', aren't stripped out by GYP.
# This list needs to be kept in sync with the cmd line options
# in src/build/android/pylib/gtest/setup.py.
# like '0' or '1', aren't stripped out by GYP. Run 'isolate.py help' for
# more details.
#
# This list needs to be kept in sync with the cmd line options
# in src/build/android/pylib/gtest/setup.py.

# Path variables are used to replace file paths when loading a .isolate
# file
'--path-variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ',

# Extra variables are replaced on the 'command' entry and on paths in
# the .isolate file but are not considered relative paths.
'--extra-variable', 'version_full=<(version_full)',

'--config-variable', 'OS=<(OS)',
'--config-variable', 'component=<(component)',
# TODO(kbr): move this to chrome_tests.gypi:gles2_conform_tests_run
# once support for user-defined config variables is added.
'--config-variable',
'internal_gles2_conform_tests=<(internal_gles2_conform_tests)',
'internal_gles2_conform_tests=<(internal_gles2_conform_tests)',
'--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)',
'--extra-variable', 'version_full=<(version_full)',
'--result', '<@(_outputs)',
'--isolate', '<(RULE_INPUT_PATH)',
'--config-variable', 'use_openssl=<(use_openssl)',
],
'conditions': [
# Note: When gyp merges lists, it appends them to the old value.
Expand Down
8 changes: 8 additions & 0 deletions build/linux/system.isolate
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': [
'../../net/third_party/nss/ssl.isolate',
],
}
14 changes: 14 additions & 0 deletions net/third_party/nss/ssl.isolate
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'conditions': [
['OS=="linux" and component=="shared_library" and use_openssl==0', {
'variables': {
'isolate_dependency_tracked': [
'<(PRODUCT_DIR)/lib/libcrssl.so',
],
},
}],
],
}

0 comments on commit c9ea791

Please sign in to comment.