Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated scheme contains additional (unspecified) targets in Test Action #1009

Open
ffittschen opened this issue Jan 18, 2021 · 0 comments
Open

Comments

@ffittschen
Copy link

Recently, we are often running into the following build errors (excerpt of hundreds of this kind):

error: Multiple commands produce '[...]/DerivedData/[...]/Build/Products/Debug-iphonesimulator/SomeApp.app
duplicate output file '[...]/DerivedData/[...]/Build/Products/Debug-iphonesimulator/SomeApp.app/_CodeSignature' on task: CodeSign [...]/DerivedData/[...]/Build/Products/Debug-iphonesimulator/SomeApp.app (in target 'SomeAppWithExtension' from project 'SomeApp')

We have a similar setup as described in #589, so we specify an AllTests scheme, in which we specify all of our individual test targets in the test action. The build and run actions contain a reference to our main application target, which is also used as the host application for this scheme.

During our investigations, we discovered that the errors always occur, when the AllTests scheme contains an additional application target in the list of targets in the Test Action of the scheme (see screenshot). When running xcodegen generate multiple times in a row (10+ times), this additional target is present in the AllTests scheme for approximately half of the cases.

We already tried debugging the SchemeGenerator, but we could not find the location in which the additional application target is added to the scheme. The testables, which are added to the XCScheme.TestAction only contain the test targets that we explicilty specify in the project.yml. So how are the bottom two entries ending up in the scheme? When opening the generated xcscheme file, it doesn't even contain a reference to those bottom two entries.

Do you have any idea, how the additional target could end up in the scheme?


project.yml
schemes:
  AllTests:
    build:
      targets:
        SomeApp: test
    run:
      executable: "SomeApp"
    test:
      gatherCoverageData: true
      language: en
      region: US
      targets:
        - name: TestTarget1
          randomExecutionOrder: true
          parallelizable: true
        - name: TestTarget2
          randomExecutionOrder: true
          parallelizable: true
        - name: TestTarget3
          randomExecutionOrder: true
          parallelizable: true
        - ...
Screenshot

Screen Shot 2021-01-18 at 12 10 32@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant