Skip to content

Commit

Permalink
GN support for setup_unittests.
Browse files Browse the repository at this point in the history
BUG=470212
R=brettw@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#337443}
  • Loading branch information
GregTho authored and Commit bot committed Jul 6, 2015
1 parent c7a4cf4 commit 734e87b
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 90 deletions.
2 changes: 2 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ group("both_gn_and_gyp") {
if (is_win) {
deps += [
"//base:pe_image_test",
"//chrome/installer/setup:setup_unittests",
"//chrome_elf:chrome_elf_unittests",
"//chrome_elf:dll_hash_main",
"//components/crash/tools:crash_service",
Expand Down Expand Up @@ -852,6 +853,7 @@ if (is_linux) {
"//cc:cc_unittests", # PASSES 4/17/2015
"//chrome_elf:chrome_elf_unittests", # FAILS 4/20/2015
"//chrome/installer/util:installer_util_unittests",
"//chrome/installer/setup:setup_unittests",
"//chrome/test:browser_tests",
"//chrome/test:interactive_ui_tests",
"//chrome/test:sync_integration_tests", # Note: need to turn off incremental linking for debug.
Expand Down
2 changes: 1 addition & 1 deletion build/gn_migration.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@
'dependencies': [
'../base/base.gyp:pe_image_test',
'../chrome/chrome.gyp:crash_service',
'../chrome/chrome.gyp:setup_unittests',
'../chrome_elf/chrome_elf.gyp:chrome_elf_unittests',
'../chrome_elf/chrome_elf.gyp:dll_hash_main',
'../components/components.gyp:wifi_test',
Expand Down Expand Up @@ -656,7 +657,6 @@
'../chrome/chrome.gyp:pack_policy_templates',
'../chrome/chrome.gyp:sb_sigutil',
'../chrome/chrome.gyp:setup',
'../chrome/chrome.gyp:setup_unittests',
'../chrome/installer/mini_installer.gyp:mini_installer',
'../chrome/tools/crash_service/caps/caps.gyp:caps',
'../cloud_print/gcp20/prototype/gcp20_device.gyp:gcp20_device',
Expand Down
4 changes: 2 additions & 2 deletions chrome/chrome_installer.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@
],
},
{
# GN version: //chrome/installer/setup:setup_unittests
'target_name': 'setup_unittests',
'type': 'executable',
'dependencies': [
Expand All @@ -325,6 +326,7 @@
# below into a separate lib and then link both setup.exe and
# setup_unittests.exe against that.
'sources': [
'<(SHARED_INTERMEDIATE_DIR)/chrome/installer/util/installer_util_strings.rc',
'installer/mini_installer/chrome.release', # Move to lib
'installer/mini_installer/appid.h',
'installer/mini_installer/chrome_appid.cc',
Expand All @@ -351,8 +353,6 @@
'installer/setup/run_all_unittests.cc',
'installer/setup/setup_constants.cc', # Move to lib
'installer/setup/setup_constants.h', # Move to lib
'installer/setup/setup_unittests.rc',
'installer/setup/setup_unittests_resource.h',
'installer/setup/setup_util.cc',
'installer/setup/setup_util_unittest.cc',
'installer/setup/setup_util_unittest.h',
Expand Down
57 changes: 57 additions & 0 deletions chrome/installer/setup/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright 2015 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.

import("//testing/test.gni")

if (is_win) {
test("setup_unittests") {
# TODO(robertshield): Move the items marked with "Move to lib"
# below into a separate lib and then link both setup.exe and
# setup_unittests.exe against that.
sources = [
"../mini_installer/appid.h",
"../mini_installer/chrome.release", # Move to lib
"../mini_installer/chrome_appid.cc",
"../mini_installer/configuration.cc",
"../mini_installer/configuration.h",
"../mini_installer/configuration_test.cc",
"../mini_installer/decompress.cc",
"../mini_installer/decompress.h",
"../mini_installer/decompress_test.cc",
"../mini_installer/mini_string.cc",
"../mini_installer/mini_string.h",
"../mini_installer/mini_string_test.cc",
"app_launcher_installer.cc", # Move to lib
"app_launcher_installer.h", # Move to lib
"archive_patch_helper.cc", # Move to lib
"archive_patch_helper.h", # Move to lib
"archive_patch_helper_unittest.cc",
"install.cc", # Move to lib
"install.h", # Move to lib
"install_unittest.cc",
"install_worker.cc", # Move to lib
"install_worker.h", # Move to lib
"install_worker_unittest.cc",
"run_all_unittests.cc",
"setup_constants.cc", # Move to lib
"setup_constants.h", # Move to lib
"setup_util.cc",
"setup_util_unittest.cc",
"setup_util_unittest.h",
]

deps = [
"//base",
"//base:i18n",
"//base/test:test_support",
"//chrome/installer/util:strings",
"//chrome/installer/util:util",
"//testing/gmock",
"//testing/gtest",
]

# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
}
}
69 changes: 0 additions & 69 deletions chrome/installer/setup/setup_unittests.rc

This file was deleted.

18 changes: 0 additions & 18 deletions chrome/installer/setup/setup_unittests_resource.h

This file was deleted.

0 comments on commit 734e87b

Please sign in to comment.