Merge pull request #13 from brightray/windows-test-support

Build test_support_chromiumcontent on Windows
This commit is contained in:
Adam Roben 2013-05-29 10:06:06 -07:00
Родитель 3cbc11e5d7 f82d6dc6f7
Коммит 0d02a8d41a
3 изменённых файлов: 61 добавлений и 27 удалений

Просмотреть файл

@ -12,9 +12,6 @@
'dependencies': [
'<(DEPTH)/sandbox/sandbox.gyp:sandbox_static',
],
'dependencies!': [
'test_support_chromiumcontent',
],
}],
],
},
@ -72,29 +69,61 @@
'<(DEPTH)/base/base.gyp:base_prefs_test_support',
'<(DEPTH)/content/content.gyp:test_support_content',
],
'actions': [
{
'action_name': 'Create libtest_support_chromiumcontent.a',
'inputs': [
'<(PRODUCT_DIR)/libbase_prefs_test_support.a',
'<(PRODUCT_DIR)/libgmock.a',
'<(PRODUCT_DIR)/libgtest.a',
'<(PRODUCT_DIR)/libnet_test_support.a',
'<(PRODUCT_DIR)/libtest_support_base.a',
'<(PRODUCT_DIR)/libtest_support_content.a',
'<(PRODUCT_DIR)/libui_test_support.a',
'conditions': [
['OS=="mac"', {
'actions': [
{
'action_name': 'Create libtest_support_chromiumcontent.a',
'inputs': [
'<(PRODUCT_DIR)/libbase_prefs_test_support.a',
'<(PRODUCT_DIR)/libgmock.a',
'<(PRODUCT_DIR)/libgtest.a',
'<(PRODUCT_DIR)/libnet_test_support.a',
'<(PRODUCT_DIR)/libtest_support_base.a',
'<(PRODUCT_DIR)/libtest_support_content.a',
'<(PRODUCT_DIR)/libui_test_support.a',
],
'outputs': [
'<(PRODUCT_DIR)/libtest_support_chromiumcontent.a',
],
'action': [
'/usr/bin/libtool',
'-static',
'-o',
'<@(_outputs)',
'<@(_inputs)',
],
},
],
'outputs': [
'<(PRODUCT_DIR)/libtest_support_chromiumcontent.a',
}],
['OS=="win"', {
'actions': [
{
'action_name': 'Create test_support_chromiumcontent.lib',
'inputs': [
'<(PRODUCT_DIR)\\obj\\base\\base_prefs_test_support.lib',
'<(PRODUCT_DIR)\\obj\\base\\test_support_base.lib',
'<(PRODUCT_DIR)\\obj\\content\\test_support_content.lib',
'<(PRODUCT_DIR)\\obj\\net\\net_test_support.lib',
'<(PRODUCT_DIR)\\obj\\testing\\gmock.lib',
'<(PRODUCT_DIR)\\obj\\testing\\gtest.lib',
'<(PRODUCT_DIR)\\obj\\ui\\ui_test_support.lib',
],
'outputs': [
'<(PRODUCT_DIR)\\test_support_chromiumcontent.lib',
],
'action': [
'lib.exe',
'/nologo',
# We can't use <(_outputs) here because that escapes the
# backslash in the path, which confuses lib.exe.
'/OUT:<(PRODUCT_DIR)\\test_support_chromiumcontent.lib',
'<@(_inputs)',
],
'msvs_cygwin_shell': 0,
},
],
'action': [
'/usr/bin/libtool',
'-static',
'-o',
'<@(_outputs)',
'<@(_inputs)',
],
},
}],
],
},
],

Просмотреть файл

@ -96,11 +96,13 @@
['exclude', 'debug/debug_on_start_win\.cc$'],
],
}],
# sandbox_static.lib gets linked directly into client applications, so
# needs to see symbols decorated with __declspec(dllimport).
['_target_name=="sandbox_static"', {
# These targets get linked directly into client applications, so need
# to see symbols decorated with __declspec(dllimport).
['_target_name in ["net_test_support", "sandbox_static", "test_support_content"]', {
'defines!': [
'BASE_IMPLEMENTATION',
'CONTENT_IMPLEMENTATION',
'NET_IMPLEMENTATION',
],
}],
['_target_name in ["v8", "v8_snapshot", "v8_nosnapshot", "v8_base", "mksnapshot", "v8_shell", "preparser_lib"]', {

Просмотреть файл

@ -39,10 +39,13 @@ BINARIES = {
'chromiumcontent.dll.lib',
'icudt.dll',
'libGLESv2.dll',
'test_support_chromiumcontent.lib',
os.path.join('obj', 'base', 'base_static.lib'),
os.path.join('obj', 'base', 'base_static.pdb'),
os.path.join('obj', 'net', 'net_test_support.pdb'),
os.path.join('obj', 'sandbox', 'sandbox_static.lib'),
os.path.join('obj', 'sandbox', 'sandbox_static.pdb'),
os.path.join('obj', 'testing', 'gtest.pdb'),
],
}