Skip to content

Conversation

@mrackwitz
Copy link
Member

Inspired by the idea of the integration tests in CocoaPods, I wrote the gem CLIntegracon, which realizes a very similar concept, but usable for any CLI executable. As it keeps backwards-compatibility with the existing specs, there is no change required to them and it was easy to integrate it back.

It only even adds one requirement more, per executed command line: it looks for unexpected files, which are not configured as ignored and fails if there are any. All specs should pass.

The execution output has altered a tiny bit. (The printed command line doesn't carry the $ anymore.) But this is currently ignored anyways and the specs didn't match them, because there were issues with different output formatting on Travis as it seems from the comments given and kept in integration.rb.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra blank line detected.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align the parameters of a method call if they span more than one line.

@fabiopelosin
Copy link
Member

@mrackwitz I love this! It will make this code much more maintainable. To merge this we need to:

  • Make the tests green
  • Add an entry to the changelog
  • I need to check a change I did to the integration specs in the Pods project editing patch which made them much faster but I don't remember the details.

Are xcodeproj diffs handles as they were before? Also I think that it would be nice if you could mention that the gem was inspired by CP.

@mrackwitz
Copy link
Member Author

@irrationalfab

  • Make the tests green

Tests are green now. (I was fixing up my commits for @houndci without flooding the commit history and a little error happened.)

  • Add an entry to the changelog

Done.

Are xcodeproj diffs handles as they were before?

Yeah, they should be. Xcode Projects are still converted to YAML on the file system, which will clean them up from IDs and ensure a fixed section order (for Ruby 1.8.7). I extracted this aspect into a separate file. (spec/integration/xcodeproj_to_yaml.rb)

Also I think that it would be nice if you could mention that the gem was inspired by CP.

No problem. Spoke already with @alloy about that, I will add there a hint in the README that it was inspired by CP and CP is using this gem, for sure.

@fabiopelosin
Copy link
Member

Looks ACE and this can be merged as it is for me. Before doing that I would like to point your attention to the following commits:

Small but important optimization iirc:

Allow to specify the runner and move the integration stuff to the integration repo so one can easily switch to the cocoapods installation on the system or to an alternative cocoapods implementation:

@mrackwitz
Copy link
Member Author

  • a30d28b

    [Integration] Don't copare diff files if they are equal

    CLIntegracon is not doing this currently. But I will put an update together to lazy format descriptions passed to Bacon::Should#satisfy.

  • 448f40b

    [Integration] Move runner to integration repos

    This would then require to redo the move of the integration stuff on branch pods-project-edit-feature of the integration repo and this repo, but that should be relatively easy. One thing where we need to pay attention: You added two new specs there. These shouldn't be lost.

  • 6d3c2c4

    [Integration] Fix for Travis

    This will fix that the Rake tasks use the correct binary. This would need to be changed here.

@fabiopelosin
Copy link
Member

CLIntegracon is not doing this currently. But I will put an update together to lazy format descriptions passed to Bacon::Should#satisfy.

👍

This would then require to redo the move of the integration stuff on branch pods-project-edit-feature of the integration repo and this repo, but that should be relatively easy. One thing where we need to pay attention: You added two new specs there. These shouldn't be lost.

Don't worry about that branch, I fix it when I will come back to it (anyway the discussed commits don't belong to that patch). Thanks for the heads up auto the new specs!

So other than the lazy format descriptions, that I wanted to point out so you can take note this can be merged. 👍 Ace work!

@fabiopelosin
Copy link
Member

@mrackwitz can we merge this?

@mrackwitz
Copy link
Member Author

@irrationalfab: The CHANGELOG was in conflict. I have merged the master back and updated the gem, with the performance improvement. It should be ready to merge now. 👍

@fabiopelosin
Copy link
Member

@mrackwitz Ace... Great work! Thank you for adventuring in the integration stuff 😂

fabiopelosin added a commit that referenced this pull request Aug 11, 2014
Use CLIntegracon for Integration Tests
@fabiopelosin fabiopelosin merged commit 946380c into CocoaPods:master Aug 11, 2014
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

Successfully merging this pull request may close these issues.

3 participants