Skip to content

Commit

Permalink
Single binary for unittests.
Browse files Browse the repository at this point in the history
Root solution for src/cloud_print.
Build cloud_print_unittests on bots.
Added virtual_driver_lib with shared files.
Moved service_state out of win dir as platform independent.

BUG=131058
TEST=unittests


Review URL: https://chromiumcodereview.appspot.com/10505010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140703 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
vitalybuka@chromium.org committed Jun 6, 2012
1 parent 2e2392b commit e1a31ac
Show file tree
Hide file tree
Showing 21 changed files with 294 additions and 192 deletions.
13 changes: 10 additions & 3 deletions build/all.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@
'dependencies': [
'../breakpad/breakpad.gyp:*',
'../chrome_frame/chrome_frame.gyp:*',
'../cloud_print/service/win/service.gyp:*',
'../cloud_print/virtual_driver/virtual_driver.gyp:*',
'../cloud_print/cloud_print.gyp:*',
'../courgette/courgette.gyp:*',
'../rlz/rlz.gyp:*',
'../sandbox/sandbox.gyp:*',
Expand Down Expand Up @@ -179,6 +178,7 @@
'../chrome/chrome.gyp:safe_browsing_tests',
'../chrome/chrome.gyp:sync_integration_tests',
'../chrome/chrome.gyp:unit_tests',
'../cloud_print/cloud_print.gyp:cloud_print_unittests',
'../content/content.gyp:content_browsertests',
'../content/content.gyp:content_unittests',
'../crypto/crypto.gyp:crypto_unittests',
Expand Down Expand Up @@ -308,6 +308,7 @@
'../chrome/chrome.gyp:safe_browsing_tests',
'../chrome/chrome.gyp:sync_integration_tests',
'../chrome/chrome.gyp:unit_tests',
'../cloud_print/cloud_print.gyp:cloud_print_unittests',
'../content/content.gyp:content_browsertests',
'../content/content.gyp:content_unittests',
'../ui/ui.gyp:gfx_unittests',
Expand Down Expand Up @@ -335,6 +336,7 @@
'../chrome/chrome.gyp:safe_browsing_tests',
'../chrome/chrome.gyp:sync_integration_tests',
'../chrome/chrome.gyp:unit_tests',
'../cloud_print/cloud_print.gyp:cloud_print_unittests',
'../content/content.gyp:content_browsertests',
'../content/content.gyp:content_unittests',
'../ui/ui.gyp:gfx_unittests',
Expand All @@ -356,6 +358,7 @@
'type': 'none',
'dependencies': [
'../base/base.gyp:base_unittests',
'../cloud_print/cloud_print.gyp:cloud_print_unittests',
'../crypto/crypto.gyp:crypto_unittests',
'temp_gyp/googleurl.gyp:googleurl_unittests',
'../net/net.gyp:net_unittests',
Expand All @@ -373,6 +376,7 @@
'type': 'none',
'dependencies': [
'../base/base.gyp:base_unittests',
'../cloud_print/cloud_print.gyp:cloud_print_unittests',
'../crypto/crypto.gyp:crypto_unittests',
'../ipc/ipc.gyp:ipc_tests',
'../media/media.gyp:media_unittests',
Expand Down Expand Up @@ -410,6 +414,7 @@
'../chrome/chrome.gyp:safe_browsing_tests',
'../chrome/chrome.gyp:sync_integration_tests',
'../chrome/chrome.gyp:unit_tests',
'../cloud_print/cloud_print.gyp:cloud_print_unittests',
'../content/content.gyp:content_browsertests',
'../content/content.gyp:content_unittests',
# mini_installer_tests depends on mini_installer. This should be
Expand Down Expand Up @@ -455,6 +460,7 @@
'type': 'none',
'dependencies': [
'../base/base.gyp:base_unittests',
'../cloud_print/cloud_print.gyp:cloud_print_unittests',
'../content/content.gyp:content_unittests',
'../crypto/crypto.gyp:crypto_unittests',
'../ipc/ipc.gyp:ipc_tests',
Expand All @@ -475,6 +481,7 @@
'dependencies': [
'../base/base.gyp:base_unittests',
'../chrome/chrome.gyp:unit_tests',
'../cloud_print/cloud_print.gyp:cloud_print_unittests',
'../content/content.gyp:content_unittests',
'../crypto/crypto.gyp:crypto_unittests',
'../ipc/ipc.gyp:ipc_tests',
Expand Down Expand Up @@ -519,7 +526,7 @@
'../chrome_frame/chrome_frame.gyp:npchrome_frame',
'../courgette/courgette.gyp:courgette',
'../courgette/courgette.gyp:courgette64',
'../cloud_print/virtual_driver/virtual_driver.gyp:virtual_driver',
'../cloud_print/cloud_print.gyp:cloud_print',
'../remoting/remoting.gyp:remoting_webapp',
'../third_party/adobe/flash/flash_player.gyp:flash_player',
],
Expand Down
48 changes: 48 additions & 0 deletions cloud_print/cloud_print.gyp
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright (c) 2012 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.
{
'targets': [
{
'target_name': 'cloud_print',
'type': 'none',
'dependencies': [
'service/service.gyp:*',
],
'conditions': [
['OS=="win"', {
'dependencies': [
'virtual_driver/win/install/virtual_driver_install.gyp:*',
'virtual_driver/win/virtual_driver.gyp:*',
'virtual_driver/win/virtual_driver64.gyp:*',
],
}],
],
},
{
'target_name': 'cloud_print_unittests',
'type': 'executable',
'sources': [
'service/service_state_unittest.cc',
],
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/base/base.gyp:run_all_unittests',
'<(DEPTH)/base/base.gyp:test_support_base',
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(DEPTH)/testing/gtest.gyp:gtest',
'service/service.gyp:cloud_print_service_lib',
],
'conditions': [
['OS=="win"', {
'sources': [
'virtual_driver/win/port_monitor/port_monitor_unittest.cc',
],
'dependencies': [
'virtual_driver/win/virtual_driver.gyp:gcp_portmon_lib',
],
}],
],
},
],
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,35 @@
'chromium_code': 1,
},
'include_dirs': [
'../../..',
'<(DEPTH)',
],
},
'targets': [
{
'target_name': 'cloud_print_service_lib',
'type': 'static_library',
'dependencies': [
'../../../base/base.gyp:base',
'../../../build/temp_gyp/googleurl.gyp:googleurl',
'../../../net/net.gyp:net',
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
'<(DEPTH)/net/net.gyp:net',
],
'sources': [
'chrome_launcher.cc',
'chrome_launcher.h',
'service_state.cc',
'service_state.h',
'service_switches.cc',
'service_switches.h',
'win/chrome_launcher.cc',
'win/chrome_launcher.h',
]
},
{
'target_name': 'cloud_print_service',
'type': 'executable',
'sources': [
'cloud_print_service.cc',
'cloud_print_service.h',
'cloud_print_service.rc',
'resource.h',
'win/cloud_print_service.cc',
'win/cloud_print_service.h',
'win/cloud_print_service.rc',
'win/resource.h',
],
'dependencies': [
'cloud_print_service_lib',
Expand All @@ -47,20 +47,5 @@
},
},
},
{
'target_name': 'cloud_print_service_unittests',
'type': 'executable',
'sources': [
'service_state_unittest.cc',
],
'dependencies': [
'../../../base/base.gyp:run_all_unittests',
'../../../base/base.gyp:base',
'../../../base/base.gyp:test_support_base',
'../../../testing/gmock.gyp:gmock',
'../../../testing/gtest.gyp:gtest',
'cloud_print_service_lib',
],
},
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cloud_print/service/win/service_state.h"
#include "cloud_print/service/service_state.h"

#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cloud_print/service/win/service_state.h"
#include "cloud_print/service/service_state.h"

#include "base/string_util.h"
#include "testing/gmock/include/gmock/gmock.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cloud_print/service/win/service_switches.h"
#include "cloud_print/service/service_switches.h"

const char kChromeTypeSwitch[] = "type";
const char kConsoleSwitch[] = "console";
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion cloud_print/service/win/chrome_launcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "base/win/registry.h"
#include "base/win/scoped_handle.h"
#include "base/win/scoped_process_information.h"
#include "cloud_print/service/win/service_switches.h"
#include "cloud_print/service/service_switches.h"

namespace {

Expand Down
4 changes: 2 additions & 2 deletions cloud_print/service/win/cloud_print_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
#include "base/path_service.h"
#include "base/string_util.h"
#include "base/win/scoped_handle.h"
#include "cloud_print/service/service_state.h"
#include "cloud_print/service/service_switches.h"
#include "cloud_print/service/win/chrome_launcher.h"
#include "cloud_print/service/win/resource.h"
#include "cloud_print/service/win/service_state.h"
#include "cloud_print/service/win/service_switches.h"

namespace {

Expand Down
15 changes: 0 additions & 15 deletions cloud_print/virtual_driver/virtual_driver.gyp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,20 @@
'chromium_code': 1,
},
'include_dirs': [
'../../../..',
'<(DEPTH)',
],
},
'targets' : [
{
'target_name': 'virtual_driver_setup',
'type': 'executable',
'dependencies': [
'../../../../base/base.gyp:base',
'../virtual_driver.gyp:virtual_driver_lib',
'<(DEPTH)/base/base.gyp:base',
'virtual_driver_setup_resources',
],
'sources': [
'setup.cc',
'../virtual_driver_consts.h',
'../virtual_driver_consts.cc',
'../virtual_driver_helpers.h',
'../virtual_driver_helpers.cc',
'../virtual_driver_common_resources.rc',
'<(SHARED_INTERMEDIATE_DIR)/virtual_driver_setup_resources/virtual_driver_setup_resources_ar.rc',
'<(SHARED_INTERMEDIATE_DIR)/virtual_driver_setup_resources/virtual_driver_setup_resources_bg.rc',
Expand Down
Loading

0 comments on commit e1a31ac

Please sign in to comment.