Consider excludes while walking Tests #152

Merged
merged 2 commits into from Mar 8, 2016

Conversation

Projects
None yet
5 participants
@aciidb0mb3r
Member

aciidb0mb3r commented Feb 27, 2016

Consider exclude directories for test modules.

Fixes this bug: https://twitter.com/kylefuller/status/703000791620132864

@czechboy0

This comment has been minimized.

Show comment
Hide comment
@czechboy0

czechboy0 Feb 27, 2016

Contributor

Very much needed, thanks for this!

Contributor

czechboy0 commented Feb 27, 2016

Very much needed, thanks for this!

@cjwirth

This comment has been minimized.

Show comment
Hide comment
@cjwirth

cjwirth Feb 27, 2016

This is definitely something we need!

In the meantime, is there some kind of workaround?

cjwirth commented Feb 27, 2016

This is definitely something we need!

In the meantime, is there some kind of workaround?

@cjwirth

This comment has been minimized.

Show comment
Hide comment
@cjwirth

cjwirth Feb 27, 2016

What I ended up doing is just forking all the repos that were failing (recurseively... 😞) and removed the Tests directory, and changing all the Package.swift files to point to my fork. Hopefully there's an easier way?

cjwirth commented Feb 27, 2016

What I ended up doing is just forking all the repos that were failing (recurseively... 😞) and removed the Tests directory, and changing all the Package.swift files to point to my fork. Hopefully there's an easier way?

@aciidb0mb3r

This comment has been minimized.

Show comment
Hide comment
@aciidb0mb3r

aciidb0mb3r Feb 27, 2016

Member

@cjwirth You can build and install swiftpm yourself with this patch in the meanwhile, that'd be easier I think. It'll be a while before this is accepted, merged and a snapshot is released

Member

aciidb0mb3r commented Feb 27, 2016

@cjwirth You can build and install swiftpm yourself with this patch in the meanwhile, that'd be easier I think. It'll be a while before this is accepted, merged and a snapshot is released

@czechboy0

This comment has been minimized.

Show comment
Hide comment
@czechboy0

czechboy0 Feb 27, 2016

Contributor

@cjwirth Actually there is a hacky way to do this, you'll probably want to hide this in a script/Makefile

  1. Run swift build once, which will successfully pull the dependencies, but eventually fail bc of the above error
  2. Recursively delete/rename all folders called Tests in Packages
  3. Run swift build again, this time the modified Packages contents will allow for a clean compilation of all the dependencies.

This feels slightly better than having to fork all dependencies recursively.

Contributor

czechboy0 commented Feb 27, 2016

@cjwirth Actually there is a hacky way to do this, you'll probably want to hide this in a script/Makefile

  1. Run swift build once, which will successfully pull the dependencies, but eventually fail bc of the above error
  2. Recursively delete/rename all folders called Tests in Packages
  3. Run swift build again, this time the modified Packages contents will allow for a clean compilation of all the dependencies.

This feels slightly better than having to fork all dependencies recursively.

@cjwirth

This comment has been minimized.

Show comment
Hide comment
@cjwirth

cjwirth Feb 27, 2016

You can build and install swiftpm yourself with this patch in the meanwhile,

This is probably the more correct way to do it, but unless want to try my hand at some development myself, I'd rather just use the snapshots .

  1. Run swift build once, which will successfully pull the dependencies, but eventually fail bc of the above error
  2. Recursively delete/rename all folders called Tests in Packages
  3. Run swift build again, this time the modified Packages contents will allow for a clean compilation of all the dependencies.

Aah, this makes a lot of sense. This is exactly the kind of hacky workaround I was looking for, thanks!

cjwirth commented Feb 27, 2016

You can build and install swiftpm yourself with this patch in the meanwhile,

This is probably the more correct way to do it, but unless want to try my hand at some development myself, I'd rather just use the snapshots .

  1. Run swift build once, which will successfully pull the dependencies, but eventually fail bc of the above error
  2. Recursively delete/rename all folders called Tests in Packages
  3. Run swift build again, this time the modified Packages contents will allow for a clean compilation of all the dependencies.

Aah, this makes a lot of sense. This is exactly the kind of hacky workaround I was looking for, thanks!

@mxcl

This comment has been minimized.

Show comment
Hide comment
@mxcl

mxcl Feb 27, 2016

Contributor

Using a newer swift build is pretty easy: You can build SwiftPM with swift build and put it first in the path.

Contributor

mxcl commented Feb 27, 2016

Using a newer swift build is pretty easy: You can build SwiftPM with swift build and put it first in the path.

@aciidb0mb3r

This comment has been minimized.

Show comment
Hide comment
@aciidb0mb3r

aciidb0mb3r Mar 7, 2016

Member

Rebased and solved conflicts due to #180

Member

aciidb0mb3r commented Mar 7, 2016

Rebased and solved conflicts due to #180

@kostiakoval

This comment has been minimized.

Show comment
Hide comment
@kostiakoval

kostiakoval Mar 7, 2016

Collaborator

LGTM 👌

Collaborator

kostiakoval commented Mar 7, 2016

LGTM 👌

@mxcl

This comment has been minimized.

Show comment
Hide comment
@mxcl

mxcl Mar 7, 2016

Contributor

@swift-ci Please test

Contributor

mxcl commented Mar 7, 2016

@swift-ci Please test

@aciidb0mb3r

This comment has been minimized.

Show comment
Hide comment
@aciidb0mb3r

aciidb0mb3r Mar 8, 2016

Member

Can I merge this? 😬

Member

aciidb0mb3r commented Mar 8, 2016

Can I merge this? 😬

vadimeisenbergibm added a commit to IBM-Swift-Sunset/GRMustache.swift that referenced this pull request Mar 8, 2016

IBM-Swift/Kitura#84 moved non Swift Package Manager tests or resourc…
…es to another directory

moved to NonSwiftPackageManagerTests
temporary measure until apple/swift-package-manager#152 is accepted
then the moved tests will be moved back to Tests, and will be excluded by "exclude" directive
 in Package.swift

vadimeisenbergibm added a commit to IBM-Swift-Sunset/GRMustache.swift that referenced this pull request Mar 8, 2016

IBM-Swift/Kitura#84 fixed submodule path of Tests/vendor/groue/GRMus…
…tacheSpec

changed to NonSwiftPackageManagerTests/vendor/groue/GRMustacheSpec
temporary measure until apple/swift-package-manager#152 is accepted
@mxcl

This comment has been minimized.

Show comment
Hide comment
@mxcl

mxcl Mar 8, 2016

Contributor

@aciidb0mb3r hit it 👊🏻

Contributor

mxcl commented Mar 8, 2016

@aciidb0mb3r hit it 👊🏻

aciidb0mb3r added a commit that referenced this pull request Mar 8, 2016

Merge pull request #152 from aciidb0mb3r/testModules_excludes
Consider excludes while walking Tests

@aciidb0mb3r aciidb0mb3r merged commit 2d70e5a into apple:master Mar 8, 2016

2 checks passed

Swift Test Linux Platform Build finished. 7983 tests run, 0 skipped, 0 failed.
Details
Swift Test OS X Platform Build finished. 32096 tests run, 0 skipped, 0 failed.
Details

@aciidb0mb3r aciidb0mb3r deleted the aciidb0mb3r:testModules_excludes branch Mar 8, 2016

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