Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: coverage: don't run tests twice #3086

Merged
merged 1 commit into from
Nov 19, 2022

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Nov 19, 2022

Makefile: coverage: don't run tests twice

Initially the tests were run twice, once with "-i" to "pre build" the tests;
8ebe435

Commit cb50952 removed the "-i" options,
as it's no longer needed since go1.10, however it did not remove the
(now duplicate) line, so tests were running twice.

Before this, every test was run twice:

Screenshot 2022-11-19 at 17 19 45

After this, tests are only run once (cutting the time for the unit tests in ~half 😂)

Screenshot 2022-11-19 at 17 20 04

Initially the tests were run twice, once with "-i"  to "pre build" the tests;
8ebe435

Commit cb50952 removed the "-i" options,
as it's no longer needed since go1.10, however it did not remove the
(now duplicate) line, so tests were running twice.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

I have a patch for some of the other warnings as well (those also failed on macOS, but looks like CI ignores them);

protoc -I.:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor/github.com/gogo/protobuf:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor:/home/circleci/.go_workspace/src:/usr/local/go_workspace/src:/usr/local/include --include_imports --descriptor_set_out=/tmp/descriptors.pb-2068773414 --gogoswarm_out=plugins=grpc+deepcopy+storeobject+raftproxy+authenticatedwrapper,import_path=github.com/moby/swarmkit/v2/api,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgithub.com/docker/swarmkit/protobuf/plugin/plugin.proto=github.com/moby/swarmkit/v2/protobuf/plugin,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:/home/circleci/.go_workspace/src /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/ca.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/control.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/dispatcher.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/health.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/logbroker.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/objects.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/raft.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/resource.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/snapshot.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/specs.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/types.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/watch.proto
/usr/local/go_workspace/src: warning: directory does not exist.
protoc -I.:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor/github.com/gogo/protobuf:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor:/home/circleci/.go_workspace/src:/usr/local/go_workspace/src:/usr/local/include --gogoswarm_out=plugins=grpc+deepcopy+storeobject+raftproxy+authenticatedwrapper,import_path=github.com/moby/swarmkit/v2/protobuf/plugin,Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgithub.com/docker/swarmkit/protobuf/plugin/plugin.proto=github.com/moby/swarmkit/v2/protobuf/plugin,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:/home/circleci/.go_workspace/src /home/circleci/.go_workspace/src/github.com/docker/swarmkit/protobuf/plugin/plugin.proto
/usr/local/go_workspace/src: warning: directory does not exist.
protoc -I.:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor/github.com/gogo/protobuf:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor:/home/circleci/.go_workspace/src:/usr/local/go_workspace/src:/usr/local/include --gogoswarm_out=plugins=grpc+deepcopy+storeobject+raftproxy+authenticatedwrapper,import_path=github.com/moby/swarmkit/v2/protobuf/plugin/deepcopy/test,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgithub.com/docker/swarmkit/protobuf/plugin/plugin.proto=github.com/moby/swarmkit/v2/protobuf/plugin,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:/home/circleci/.go_workspace/src /home/circleci/.go_workspace/src/github.com/docker/swarmkit/protobuf/plugin/deepcopy/test/deepcopy.proto
/usr/local/go_workspace/src: warning: directory does not exist.
protoc -I.:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor/github.com/gogo/protobuf:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor:/home/circleci/.go_workspace/src:/usr/local/go_workspace/src:/usr/local/include --gogoswarm_out=plugins=grpc+deepcopy+storeobject+raftproxy+authenticatedwrapper,import_path=github.com/moby/swarmkit/v2/protobuf/plugin/raftproxy/test,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgithub.com/docker/swarmkit/protobuf/plugin/plugin.proto=github.com/moby/swarmkit/v2/protobuf/plugin,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types:/home/circleci/.go_workspace/src /home/circleci/.go_workspace/src/github.com/docker/swarmkit/protobuf/plugin/raftproxy/test/service.proto
/usr/local/go_workspace/src: warning: directory does not exist.
protoc -I /usr/local/include --decode google.protobuf.FileDescriptorSet /usr/local/include/google/protobuf/descriptor.proto

@thaJeztah

This comment was marked as outdated.

@thaJeztah

This comment was marked as outdated.

@thaJeztah

This comment was marked as outdated.

@thaJeztah thaJeztah changed the title Makefile: fix coverage, and don't run tests twice Makefile: coverage: don't run tests twice Nov 19, 2022
@thaJeztah
Copy link
Member Author

Moved the fix for the failing test to #3087 and removed the second commit (which wasn't needed after all).

@corhere @neersighted @dperny PTAL

@thaJeztah
Copy link
Member Author

Thx! Let me bring this one in

@thaJeztah thaJeztah merged commit c37fea1 into moby:master Nov 19, 2022
@thaJeztah thaJeztah deleted the fix_coverage branch November 19, 2022 22:16
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.

None yet

2 participants