Subito-it / PodBuilder

A tool to precompile CocoaPods pods
Other
284 stars 28 forks source link

Test Spec Support #30

Closed Nytecaster closed 3 years ago

Nytecaster commented 3 years ago

I came across this library and was intrigued at the prospect of speeding up our CI systems significantly with pre-compiled frameworks. We support a mono repo which contains local access to some libraries. We also include unit testing in those libraries in order to validate upon each merge request.

So the question is, does Pod Builder support test specs? If not, is there any plans to eventually support it? As you can see below, the test specs portion was ignored and never included in the main Podfile.

pod 'MyPod', :path => 'Modules/MyPod', :testspecs => ['MyPodTests']

Results in:

pod 'MyPod', :path => 'PodBuilder/Prebuilt/MyPod'

tcamin commented 3 years ago

I'm unsure what is expected here. The compiled framework does not include the testing code nor has references to the testing source code. How would you expect this to work?

Our approach which includes tests for internal pods is potentially similar to your setup (even if we don't use testspecs):

Nytecaster commented 3 years ago

CocoaPods has built in unit testing for pods with the testspecs option as I displayed above. This creates a unit test scheme that you can access from your main project's workspace when integrating with CocoaPods with the

install! 'cocoapods',
   :share_schemes_for_development_pods => true 

Therefore when I add: pod 'MyPod', :path => 'Modules/MyPod', :testspecs => ['MyPodTests']

I would hope to see: pod 'MyPod', :path => 'PodBuilder/Prebuilt/MyPod', :testspecs => ['MyPodTests'] to include the :testspecs options copied over as well.

PS. We don't create separate projects for modules anymore since we can run the full unit test suite without it.

tcamin commented 3 years ago

Unfortunately testspecs are not currently supported