Touching a file and hitting play in test navigator should invalidate the test target |
||
Issue descriptionWhat steps will reproduce the problem? (1) Build a test target, e.g. ios_chrome_settings_egtests_module (2) Run the tests (3) Make a change to one of the files that the target builds (4) Click the play button near one of the tests in the test navigator What is the expected result? Touching a file and hitting play should invalidate the test target. What happens instead? The target is not re-compiled, so we don't test the updated code, but the one that was compiled before the change.
,
Mar 24 2017
The problem is that hitting play button re-compiles ios_chrome_settings_egtests_module, but not ios_chrome_settings_egtests, while ios_chrome_settings_egtests_module is just an empty shell, all files are associated with ios_chrome_settings_egtests. The solution is to have ios_chrome_settings_egtests_module depends on ios_chrome_settings_egtests. I had a hacking script that proves the solution would work, and I didn't see any noticeable Xcode performance degradation or index size blowout. So, I will implement this solution in gn to have this issue fixed.
,
Mar 24 2017
To include more details,
Following PBXObjects and dependencies need to be implemented in order to support this solution.
/* Begin PBXContainerItemProxy section */
06929B5F1E8590BE00902FC5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = E14CBEE23288D6130B9D5306 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 28A6401E322348DD8704D919;
remoteInfo = ios_chrome_settings_egtests;
};
/* End PBXContainerItemProxy section */
/* Begin PBXTargetDependency section */
06929B601E8590BE00902FC5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 28A6401E322348DD8704D919 /* ios_chrome_settings_egtests */;
targetProxy = 06929B5F1E8590BE00902FC5 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
41B030B9CA3F05989D157E3D /* ios_chrome_settings_egtests_module */ = {
isa = PBXNativeTarget;
buildConfigurationList = 767997A67A3AB7E11E99FB70 /* Build configuration list for PBXNativeTarget "ios_chrome_settings_egtests_module" */;
buildPhases = (
7F3800F8EC45966716EEF5A1 /* Action "Compile and copy ios_chrome_settings_egtests_module via ninja" */,
27358FC1E1821463BF532B82 /* Sources */,
EC4F048630E98543EEF6C050 /* Frameworks */,
);
buildRules = (
);
dependencies = (
06929B601E8590BE00902FC5 /* PBXTargetDependency */,
);
name = ios_chrome_settings_egtests_module;
productName = ios_chrome_settings_egtests_module;
productReference = 5082B4D281138329C62FD27F /* ios_chrome_settings_egtests_module.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
,
Mar 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/611254763b178dd9a1680e1e107a09aefb1267cb commit 611254763b178dd9a1680e1e107a09aefb1267cb Author: liaoyuke <liaoyuke@chromium.org> Date: Thu Mar 30 17:13:39 2017 [iOS] Add application target as dependency of xctest module target. Previously, clicking on the "Play" button near a test in the test navigator doesn't automatically re-build the application target, so that tests don't test the current state of the code, but the one when it was last compiled. This CL fixes the problem by adding corresponding application target as a dependency of xctest module target. BUG= 705005 Review-Url: https://codereview.chromium.org/2779833002 Cr-Commit-Position: refs/heads/master@{#460805} [modify] https://crrev.com/611254763b178dd9a1680e1e107a09aefb1267cb/tools/gn/xcode_object.cc [modify] https://crrev.com/611254763b178dd9a1680e1e107a09aefb1267cb/tools/gn/xcode_object.h [modify] https://crrev.com/611254763b178dd9a1680e1e107a09aefb1267cb/tools/gn/xcode_writer.cc
,
Apr 12 2017
It seems that nobody has rolled GN for nearly a month, Sylvain, do you mind helping roll it if it's not very time-consuming? Forget about it if you need to spend too much time on, it's not super important. Thanks!
,
Apr 18 2017
I've started a roll of gn (see ). In the future, you can roll it yourself buy using the script in src/tools/gn/bin/roll_gn.py in an up-to-date tree: $ cd chromium/src $ git fetch origin $ git checkout origin/master $ gclient sync $ tools/gn/bin/roll_gn.py
,
Apr 18 2017
There is nothing to roll according to the script: https://codereview.chromium.org/2824173002/ Cancelled the roll.
,
Apr 18 2017
This was rolled by https://codereview.chromium.org/2816243002.
,
Apr 18 2017
That's great! Thank you for the update!
,
Apr 18 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by lpromero@chromium.org
, Mar 24 2017