Skip to content

Conversation

@giuseppe
Copy link
Member

Read this bit that got lostwith commit 0138186

Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com

Makefile Outdated

test: deps
@go test $(BUILDFLAGS) -cover $(PACKAGES)
@go test $(BUILDFLAGS) -cover $(PACKAGES) ./...
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this supposed to fix? What is the failure, and how does this improve on it?

Look at PACKAGES is computed: it is supposed to be equivalent to ./..., except that vendor/** is excluded. We don’t really want to run tests in the vendored packages, so I can’t see what difference this should make.

Copy link
Member Author

Choose a reason for hiding this comment

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

not sure if it is the correct fix but make test doesn't run any test for me on master. This is what I get:

$ make test
?   	github.com/projectatomic/skopeo/vendor/github.com/containers/image	[no test files]

Copy link
Collaborator

Choose a reason for hiding this comment

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

That… doesn’t make any sense to me. How can the list of packages tested contain only a /vendor/ package which has been explicitly filtered out?

Can you look into how $PACKAGES is computed, and perhaps compare that with make --just-print test?

Copy link
Member Author

Choose a reason for hiding this comment

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

ok so the issue was that I was running it from skopeo/vendor for quickly verifying a patch. I've pushed another fix

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok so the issue was that I was running it from skopeo/vendor for quickly verifying a patch.

How? github.com/projectatomic/skopeo/vendor/github.com/containers/image does not contain a copy of this Makefile at all.

Copy link
Member Author

Choose a reason for hiding this comment

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

I copied over this repository so that I could test directly with Skopeo. I agree it is a weird case, and not something you probably want to support, so feel free to close this PR

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, it is a weird case, and to be clear, not at all supported. But the change is innocuous enough, I guess, so I’ll let @runcom decide.

I was using a repository inside skopeo/vendor and the tests were
skipped.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@mtrmac
Copy link
Collaborator

mtrmac commented Feb 27, 2017

👍 @runcom deferring to your decision.

Approved with PullApprove

@erikh
Copy link
Contributor

erikh commented Feb 27, 2017

If I may jump in, I don't think this is a good idea; $(PACKAGES) vs ./... means that ./... will always contain the subset that is in $(PACKAGES) (which includes vendor/)

@runcom
Copy link
Member

runcom commented Feb 27, 2017

If I may jump in, I don't think this is a good idea; $(PACKAGES) vs ./... means that ./... will always contain the subset that is in $(PACKAGES) (which includes vendor/)

could you look at the last rev of this PR? I think it's safe to pull this in now.

@erikh
Copy link
Contributor

erikh commented Feb 27, 2017

yep LGTM

@runcom
Copy link
Member

runcom commented Feb 27, 2017

LGTM

Approved with PullApprove

@runcom runcom merged commit 5a23d73 into containers:master Feb 27, 2017
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.

4 participants