diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-28 12:23:24 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-28 12:23:24 +0000 |
commit | 592e49be03835b22d6265d58d58ab8be2b1f0003 (patch) | |
tree | ee92e26e8d2166dc0bf4998cfb16a68692e713a3 | |
parent | aaaf4e93fe07f49af041d0778f5591e6cab137c5 (diff) | |
download | chromium_src-592e49be03835b22d6265d58d58ab8be2b1f0003.zip chromium_src-592e49be03835b22d6265d58d58ab8be2b1f0003.tar.gz chromium_src-592e49be03835b22d6265d58d58ab8be2b1f0003.tar.bz2 |
Bundle resources into the unit_test target on iOS
On iOS, all resources used in tests must be bundled into the unit test
target's app bundle (since the Mac approach of looking next to the binary
in the build directory doesn't work since the app is copied to a simulator
or device before being run).
This creates a gypi that can be included in any target that needs pak
files bundled on iOS (unit_tests, higher-level tests, the app, etc.), and
uses it in unit_tests.
BUG=None
Review URL: https://chromiumcodereview.appspot.com/11412069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169913 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/chrome_ios_bundle_resources.gypi | 16 | ||||
-rw-r--r-- | chrome/chrome_tests_unit.gypi | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/chrome/chrome_ios_bundle_resources.gypi b/chrome/chrome_ios_bundle_resources.gypi new file mode 100644 index 0000000..988654b --- /dev/null +++ b/chrome/chrome_ios_bundle_resources.gypi @@ -0,0 +1,16 @@ +# 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. +{ + 'dependencies': [ + '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources', + '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources', + ], + 'mac_bundle_resources': [ + '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak', + '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak', + '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak', + '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak', + '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))', + ], +} diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi index be420792..79f78de 100644 --- a/chrome/chrome_tests_unit.gypi +++ b/chrome/chrome_tests_unit.gypi @@ -1690,6 +1690,8 @@ ], }], ], + # Bundle all the necessary resources into the test bundle. + 'includes': ['chrome_ios_bundle_resources.gypi'], 'actions': [ { 'action_name': 'copy_test_data', |