Skip to content

Conversation

weibel
Copy link

@weibel weibel commented May 22, 2018

In our project we have an intricate group structure and at some point the group containing our specs moved into a subfolder in the hierarchy.

When we run pod install after adding EarlGrey it will fail with the error

RuntimeError - Test target group not found!
/Users/kasper/.rvm/gems/ruby-2.3.1/bundler/gems/EarlGrey-35532c4e95c6/gem/lib/earlgrey/configure_earlgrey.rb:369:in `copy_swift_files'
etc.

After looking through the code the culprit seemed to be the way the target names and group names are matched in configure_earlgrey.rb in copy_swift_files. In test_target_group = project_test_targets.find { |g| g.display_name == target.name } only the root groups are looked at, and it did not work for our project.

To solve the problem we have added a new method which will recurse through the group hierarchy until it finds a matching group name.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@googlebot
Copy link

CLAs look good, thanks!

Merge downstream changes
@tirodkar
Copy link
Contributor

tirodkar commented Aug 3, 2018

Thanks for looking into this @weibel. Apologies for not getting to it faster. Can you add a simple test for it in our rspec as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants