aboutsummaryrefslogtreecommitdiff
path: root/tests.sh
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2016-07-19 17:20:31 -0700
committerFeng Xiao <xfxyjwf@gmail.com>2016-07-20 13:53:44 -0700
commita4f68b16a01c131c4c6c34f1d43b4c9bd93bc0a7 (patch)
tree34db41b4268afd3fa23eb4f3b5e39705506a7ca3 /tests.sh
parentaf8732ec11555f8e86d335fb737c585468df53f6 (diff)
downloadprotobuf-a4f68b16a01c131c4c6c34f1d43b4c9bd93bc0a7.tar.gz
protobuf-a4f68b16a01c131c4c6c34f1d43b4c9bd93bc0a7.tar.bz2
protobuf-a4f68b16a01c131c4c6c34f1d43b4c9bd93bc0a7.zip
Add missing files in EXTRA_DIST and add a test.
Change-Id: If80725402173cdf50969cb08e7fe5affe3532fb2
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 80b4abc5..4b8ef2f6 100755
--- a/tests.sh
+++ b/tests.sh
@@ -44,6 +44,30 @@ build_cpp() {
build_cpp_distcheck() {
./autogen.sh
./configure
+ make dist
+
+ # List all files that should be included in the distribution package.
+ git ls-files | grep "^\(java\|python\|objectivec\|csharp\|js\|ruby\|cmake\|examples\)" |\
+ grep -v ".gitignore" | grep -v "java/compatibility_tests" > dist.lst
+ # Unzip the dist tar file.
+ DIST=`ls *.tar.gz`
+ tar -xf $DIST
+ cd ${DIST//.tar.gz}
+ # Check if every file exists in the dist tar file.
+ FILES_MISSING=""
+ for FILE in $(<../dist.lst); do
+ if ! file $FILE &>/dev/null; then
+ echo "$FILE is not found!"
+ FILES_MISSING="$FILE $FILES_MISSING"
+ fi
+ done
+ cd ..
+ if [ ! -z "$FILES_MISSING" ]; then
+ echo "Missing files in EXTRA_DIST: $FILES_MISSING"
+ exit 1
+ fi
+
+ # Do the regular dist-check for C++.
make distcheck -j2
}
@@ -320,6 +344,7 @@ build_javascript() {
if [ "$#" -ne 1 ]; then
echo "
Usage: $0 { cpp |
+ cpp_distcheck |
csharp |
java_jdk6 |
java_jdk7 |