LiuZe 3b51f35e80 base commit | 1 anno fa | |
---|---|---|
.. | ||
v2.5.0 | 1 anno fa | |
README.md | 1 anno fa |
This directory contains tests to ensure protobuf library is compatible with previously released versions.
For each released protobuf version we are testing compatibility with, there is a sub-directory with the following layout (take v2.5.0 as an example):
The testing code is extracted from regular protobuf unittests by removing:
It's also divided into 3 submodule with tests depending on more_protos and more_protos depending on protos. This way we can test scenarios where only part of the dependency is upgraded to the new version.
We use a shell script to drive the test of different scenarios so the test will only run on unix-like environments. The script expects a few command line tools to be available on PATH: git, mvn, wget, grep, sed, java.
Before running the tests, make sure you have already built the protoc binary following the C++ installation instructions. The test scripts will use the built binary located at ${protobuf}/src/protoc.
To start a test, simply run the test.sh script in each version directory. For example:
$ v2.5.0/test.sh
For each version, the test script will test:
and see whether everything builds/runs fine. Both source compatibility and binary compatibility will be tested.