xCode Server sometimes picks up wrong target when building test scheme

Hello everyone,


We want to use xCode Server to run automated tests, and we encouter a problem here. xCode Server picks up wrong target when it builds the test scheme.


Here is the details. We have three targets, call it OurApp, OurApp-ent, and AutomatedTests. The AutomatedTests target is a test target with host application being set to OurApp. A scheme called AutomatedTests is created based on the AutomatedTests target. So this scheme SHOULD only depend on the OurApp target and it should NOT depend on OurApp-ent target.


If we build or run this AutomatedTests scheme within xCode, it works fine. It builds only the AutomatedTests target and the OurApp target.


Then we create a Bot based on this AutomatedTests scheme. Then we have trouble. Sometimes xCode Server just builds the OurApp and AutomatedTests targets. This is correct. But SOMETIMES, xCode Server decides to build the OurApp-ent target as well, without any change in the source code or the settings! And this will fail because both OurApp and OurApp-ent go to the same destination folder.


Now our question:

1. Why xCode Server SOMETIMES picks up the wrong target? We have source control, and we can tell that the software has been changed, but xCode Server can behave differently with the same source code. And there is no observable patterns.

2. Is it possible to force xCode to use different Build Product folders for different targets? Then even if xCode Server is confused about the dependences and tries to build extra/unnecessary targets, they won't mess up with each other.


Thank you in advance.

I am experiencing exactly the same problem.

The same here

xCode Server sometimes picks up wrong target when building test scheme
 
 
Q