Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
e9ea200e
Unverified
Commit
e9ea200e
authored
Dec 14, 2018
by
Hao Nguyen
Committed by
GitHub
Dec 14, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5468 from haon4/master
Use docker for csharp, java_compatibility, and python_compatibility.
parents
5518c016
6cb87bd1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
35 deletions
+43
-35
test.sh
java/compatibility_tests/v2.5.0/test.sh
+10
-7
build.sh
kokoro/linux/csharp/build.sh
+11
-5
build.sh
kokoro/linux/java_compatibility/build.sh
+11
-5
prepare_build_linux_rc
kokoro/linux/prepare_build_linux_rc
+0
-13
build.sh
kokoro/linux/python_compatibility/build.sh
+11
-5
No files found.
java/compatibility_tests/v2.5.0/test.sh
View file @
e9ea200e
...
...
@@ -5,6 +5,9 @@ set -ex
# Change to the script's directory.
cd
$(
dirname
$0
)
MAVEN_LOCAL_REPOSITORY
=
/var/maven_local_repository
MVN
=
"mvn --batch-mode -e -X -Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=
$MAVEN_LOCAL_REPOSITORY
"
# Version of the tests (i.e., the version of protobuf from where we extracted
# these tests).
TEST_VERSION
=
`
grep
"^ <version>.*</version>"
pom.xml |
sed
"s| <version>
\(
.*
\)
</version>|
\1
|"
`
...
...
@@ -59,7 +62,7 @@ echo "Running compatibility tests between $VERSION_NUMBER and $OLD_VERSION"
# Build and install protobuf-java-$VERSION_NUMBER.jar
[
-f
../../core/target/protobuf-java-
$VERSION_NUMBER
.jar
]
||
{
pushd
../..
mvn
install
-Dmaven
.test.skip
=
true
$MVN
install
-Dmaven
.test.skip
=
true
popd
}
...
...
@@ -81,7 +84,7 @@ chmod +x protoc
# Test A.1:
# protos: use new version
# more_protos: use old version
mvn
clean
test
\
$MVN
clean
test
\
-Dprotobuf
.test.source.path
=
$(
pwd
)
/protobuf
\
-Dprotoc
.path
=
$(
pwd
)
/protoc
\
-Dprotos
.protoc.path
=
$(
pwd
)
/../../../src/protoc
\
...
...
@@ -90,7 +93,7 @@ mvn clean test \
# Test A.2:
# protos: use old version
# more_protos: use new version
mvn
clean
test
\
$MVN
clean
test
\
-Dprotobuf
.test.source.path
=
$(
pwd
)
/protobuf
\
-Dprotoc
.path
=
$(
pwd
)
/protoc
\
-Dmore_protos
.protoc.path
=
$(
pwd
)
/../../../src/protoc
\
...
...
@@ -103,12 +106,12 @@ mvn clean test \
# make it easier to run binary compatibility test (where we will need to run
# the jar files directly).
cd
deps
mvn
assembly:single
$MVN
assembly:single
cd
..
cp
-f
deps/target/compatibility-test-deps-
${
TEST_VERSION
}
-jar-with-dependencies
.jar deps.jar
# Build the old version of all 3 artifacts.
mvn
clean
install
-Dmaven
.test.skip
=
true
-Dprotoc
.path
=
$(
pwd
)
/protoc
-Dprotobuf
.version
=
$OLD_VERSION
$MVN
clean
install
-Dmaven
.test.skip
=
true
-Dprotoc
.path
=
$(
pwd
)
/protoc
-Dprotobuf
.version
=
$OLD_VERSION
cp
-f
protos/target/compatibility-protos-
${
TEST_VERSION
}
.jar protos.jar
cp
-f
more_protos/target/compatibility-more-protos-
${
TEST_VERSION
}
.jar more_protos.jar
cp
-f
tests/target/compatibility-tests-
${
TEST_VERSION
}
.jar tests.jar
...
...
@@ -125,7 +128,7 @@ cd ..
# Test B.2: update protos.jar only.
cd
protos
mvn
clean package
-Dmaven
.test.skip
=
true
-Dprotoc
.path
=
$(
pwd
)
/../../../../src/protoc
-Dprotobuf
.version
=
$VERSION_NUMBER
$MVN
clean package
-Dmaven
.test.skip
=
true
-Dprotoc
.path
=
$(
pwd
)
/../../../../src/protoc
-Dprotobuf
.version
=
$VERSION_NUMBER
cd
..
cd
protobuf
java
-cp
../../../core/target/protobuf-java-
$VERSION_NUMBER
.jar:../protos/target/compatibility-protos-
${
TEST_VERSION
}
.jar:../more_protos.jar:../tests.jar:../deps.jar org.junit.runner.JUnitCore
$TESTS
...
...
@@ -133,7 +136,7 @@ cd ..
# Test B.3: update more_protos.jar only.
cd
more_protos
mvn
clean package
-Dmaven
.test.skip
=
true
-Dprotoc
.path
=
$(
pwd
)
/../../../../src/protoc
-Dprotobuf
.version
=
$VERSION_NUMBER
$MVN
clean package
-Dmaven
.test.skip
=
true
-Dprotoc
.path
=
$(
pwd
)
/../../../../src/protoc
-Dprotobuf
.version
=
$VERSION_NUMBER
cd
..
cd
protobuf
java
-cp
../../../core/target/protobuf-java-
$VERSION_NUMBER
.jar:../protos.jar:../more_protos/target/compatibility-more-protos-
${
TEST_VERSION
}
.jar:../tests.jar:../deps.jar org.junit.runner.JUnitCore
$TESTS
...
...
kokoro/linux/csharp/build.sh
View file @
e9ea200e
#!/bin/bash
#
# Build file to set up and run tests
# This is the top-level script we give to Kokoro as the entry point for
# running the "pull request" project:
#
# This script selects a specific Dockerfile (for building a Docker image) and
# a script to run inside that image. Then we delegate to the general
# build_and_run_docker.sh script.
# Change to repo root
cd
$(
dirname
$0
)
/../../..
# Prepare worker environment to run tests
source
kokoro/linux/prepare_build_linux_rc
./tests.sh csharp
export
DOCKERFILE_DIR
=
kokoro/linux/64-bit
export
DOCKER_RUN_SCRIPT
=
kokoro/linux/pull_request_in_docker.sh
export
OUTPUT_DIR
=
testoutput
export
TEST_SET
=
"csharp"
./kokoro/linux/build_and_run_docker.sh
kokoro/linux/java_compatibility/build.sh
View file @
e9ea200e
#!/bin/bash
#
# Build file to set up and run tests
# This is the top-level script we give to Kokoro as the entry point for
# running the "pull request" project:
#
# This script selects a specific Dockerfile (for building a Docker image) and
# a script to run inside that image. Then we delegate to the general
# build_and_run_docker.sh script.
# Change to repo root
cd
$(
dirname
$0
)
/../../..
# Prepare worker environment to run tests
source
kokoro/linux/prepare_build_linux_rc
./tests.sh java_compatibility
export
DOCKERFILE_DIR
=
kokoro/linux/64-bit
export
DOCKER_RUN_SCRIPT
=
kokoro/linux/pull_request_in_docker.sh
export
OUTPUT_DIR
=
testoutput
export
TEST_SET
=
"java_compatibility"
./kokoro/linux/build_and_run_docker.sh
kokoro/linux/prepare_build_linux_rc
deleted
100644 → 0
View file @
5518c016
#!/bin/bash
# Source this rc script to prepare the environment for Linux builds
# Set up dotnet
sudo
sh
-c
'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo
apt-key adv
--keyserver
keyserver.ubuntu.com
--recv-keys
EB3E94ADBE1229CF
sudo
apt-get update
# We use the .NET Core SDK 2.x to build...
sudo
apt-get
install
-y
dotnet-sdk-2.1.3
# But we also need the 1.x framework to test against, as we
# target netstandard1.x
sudo
apt-get
install
-y
dotnet-sharedframework-microsoft.netcore.app-1.0.5
kokoro/linux/python_compatibility/build.sh
View file @
e9ea200e
#!/bin/bash
#
# Build file to set up and run tests
# This is the top-level script we give to Kokoro as the entry point for
# running the "pull request" project:
#
# This script selects a specific Dockerfile (for building a Docker image) and
# a script to run inside that image. Then we delegate to the general
# build_and_run_docker.sh script.
# Change to repo root
cd
$(
dirname
$0
)
/../../..
# Prepare worker environment to run tests
source
kokoro/linux/prepare_build_linux_rc
./tests.sh python_compatibility
export
DOCKERFILE_DIR
=
kokoro/linux/64-bit
export
DOCKER_RUN_SCRIPT
=
kokoro/linux/pull_request_in_docker.sh
export
OUTPUT_DIR
=
testoutput
export
TEST_SET
=
"python_compatibility"
./kokoro/linux/build_and_run_docker.sh
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment