Skip to content

Commit

Permalink
Rename aura_shell_unittests to ash_unittests, part 1
Browse files Browse the repository at this point in the history
* Rename aura_shell_unittests target to ash_unittests
* Add a target for aura_shell_unittests that makes a copy of ash_unittests

We need the old copy until we can switch the build bots to using the new copy.

cp.py needs to change slightly to preserve the executable bit of the test binary.

BUG=110107
TEST=Run build/gyp_chromium, inspected build.ninja files to verify rules existed for both ash_unittests and aura_shell_unittests, built and ran both targets
TBR=thestig@chromium.org for trivial rename in tools/valgrind/chrome_test.py


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146654 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jamescook@chromium.org committed Jul 13, 2012
1 parent bc6d4db commit c11172a
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 8 deletions.
38 changes: 35 additions & 3 deletions ash/ash.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
],
},
{
'target_name': 'aura_shell_unittests',
'target_name': 'ash_unittests',
'type': 'executable',
'dependencies': [
'../base/base.gyp:base',
Expand Down Expand Up @@ -394,7 +394,7 @@
'launcher/launcher_context_menu_unittest.cc',
'launcher/launcher_model_unittest.cc',
'launcher/launcher_navigator_unittest.cc',
'launcher/launcher_tooltip_manager_unittest.cc',
'launcher/launcher_tooltip_manager_unittest.cc',
'launcher/launcher_unittest.cc',
'launcher/launcher_view_unittest.cc',
'root_window_controller_unittest.cc',
Expand Down Expand Up @@ -468,7 +468,7 @@
'sources/': [
['exclude', 'accelerators/accelerator_controller_unittest.cc'],
['exclude', 'accelerators/accelerator_filter_unittest.cc'],
['exclude', 'accelerators/nested_dispatcher_controller_unittest.cc'],
['exclude', 'accelerators/nested_dispatcher_controller_unittest.cc'],
['exclude', 'drag_drop/drag_drop_controller_unittest.cc'],
['exclude', 'tooltips/tooltip_controller_unittest.cc'],
],
Expand All @@ -482,6 +482,38 @@
}],
],
},
# ash_unittests was formerly named aura_shell_unittests. While the build
# bots are being switched to use the new name we need to support both
# executables.
# TODO(jamescook): Remove this section when build bots are building and
# running ash_unittests.
{
'target_name': 'aura_shell_unittests',
'type': 'none',
'dependencies': [
'ash_unittests',
],
'actions': [
{
'message': 'TEMPORARY: Copy ash_unittests to aura_shell_unittests',
'action_name': 'copy_ash_unittests',
'variables': {
'source_file': '<(PRODUCT_DIR)/ash_unittests<(EXECUTABLE_SUFFIX)',
'dest_file': '<(PRODUCT_DIR)/aura_shell_unittests<(EXECUTABLE_SUFFIX)',
},
'inputs': [
'<(DEPTH)/build/cp.py',
'<(source_file)',
],
'outputs': [
'<(dest_file)',
],
'action': [
'python', '<(DEPTH)/build/cp.py', '<(source_file)', '<(dest_file)',
],
},
],
},
{
'target_name': 'ash_shell',
'type': 'executable',
Expand Down
5 changes: 5 additions & 0 deletions build/all.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,11 @@
['use_ash==1', {
'dependencies': [
'../ash/ash.gyp:ash_shell',
# With aura_shell_unittests as a target ash_unittests (the new
# name) will be built as well. We need both until all build
# bots are running ash_unittests as the test target.
# TODO(jamescook): Switch to ash_unittests after all bots on
# waterfall are using the new name. crbug.com/110107
'../ash/ash.gyp:aura_shell_unittests',
],
}],
Expand Down
3 changes: 2 additions & 1 deletion build/cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@


def Main(src, dst):
return shutil.copyfile(src, dst)
# Use copy instead of copyfile to ensure the executable bit is copied.
return shutil.copy(src, dst)


if __name__ == '__main__':
Expand Down
4 changes: 2 additions & 2 deletions tools/heapcheck/chrome_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self, options, args, test):
# The known list of tests.
# Recognise the original abbreviations as well as full executable names.
self._test_list = {
"ash": self.TestAsh, "aura_shell_unittests": self.TestAsh,
"ash": self.TestAsh, "ash_unittests": self.TestAsh,
"aura": self.TestAura, "aura_unittests": self.TestAura,
"base": self.TestBase, "base_unittests": self.TestBase,
"browser": self.TestBrowser, "browser_tests": self.TestBrowser,
Expand Down Expand Up @@ -244,7 +244,7 @@ def SimpleTest(self, module, name, heapcheck_test_args=None, cmd_args=None):
return heapcheck_test.RunTool(cmd, supp, module)

def TestAsh(self):
return self.SimpleTest("ash", "aura_shell_unittests")
return self.SimpleTest("ash", "ash_unittests")

def TestAura(self):
return self.SimpleTest("aura", "aura_unittests")
Expand Down
4 changes: 2 additions & 2 deletions tools/valgrind/chrome_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def RunCmdLine(self):
return tool.Run(cmd, None)

def TestAsh(self):
return self.SimpleTest("ash", "aura_shell_unittests")
return self.SimpleTest("ash", "ash_unittests")

def TestAura(self):
return self.SimpleTest("aura", "aura_unittests")
Expand Down Expand Up @@ -474,7 +474,7 @@ def TestLayout(self):
# Recognise the original abbreviations as well as full executable names.
_test_list = {
"cmdline" : RunCmdLine,
"ash": TestAsh, "aura_shell_unittests": TestAsh,
"ash": TestAsh, "ash_unittests": TestAsh,
"aura": TestAura, "aura_unittests": TestAura,
"automated_ui" : TestAutomatedUI,
"base": TestBase, "base_unittests": TestBase,
Expand Down

0 comments on commit c11172a

Please sign in to comment.