Makefile: Fix race in `no-proto-changes` target
The no-proto-changes
target first regenerates the Protobuf files and
then checks whether there are any changes compared to the Protobuf
definitions. To regenerate the files, we first delete the target
directory that contains the generated code so that we start from a clean
slate. This is causing problems though when this target is executed via
make verify
, which besides other targets also executes the lint
target. Now if the code is getting deleted while the linter runs in
parallel then it may happen that linting fails due to the missing code.
This MR refactors our tests so that we can get rid of almost all of the test services thate exist in our codebase in favor of either using grpc_testing
or our Gitaly services. The only remaining test service is moved into proto/testproto
so that the generated test code is in the same tree as our production code. This buys us the ability to easily generate all Protobuf code in a different target directory so that we can just compare that overridden target directory with our committed sources. And that means that we don't ever have to touch the source directory to check for modifications, which fixes the race.