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
1baaedfb
Commit
1baaedfb
authored
8 years ago
by
Bo Yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add php test script for automated tests.
parent
b9bad65b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
8 deletions
+63
-8
tests.sh
tests.sh
+63
-8
No files found.
tests.sh
View file @
1baaedfb
...
...
@@ -35,14 +35,13 @@ internal_build_cpp() {
build_cpp
()
{
internal_build_cpp
make check
-j2
pushd
conformance
make test_cpp
popd
cd
conformance
&&
make test_cpp
&&
cd
..
# Verify benchmarking code can build successfully.
pushd
benchmarks
make
&&
./generate-datasets
popd
git submodule init
git submodule update
cd
third_party/benchmark
&&
cmake
-DCMAKE_BUILD_TYPE
=
Release
&&
make
&&
cd
../..
cd
benchmarks
&&
make
&&
./generate-datasets
&&
cd
..
}
build_cpp_distcheck
()
{
...
...
@@ -51,7 +50,7 @@ build_cpp_distcheck() {
make dist
# List all files that should be included in the distribution package.
git ls-files |
grep
"^
\(
java
\|
python
\|
objectivec
\|
csharp
\|
js
\|
ruby
\|
php
\|
cmake
\|
examples
\)
"
|
\
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
`
...
...
@@ -296,6 +295,8 @@ build_python() {
build_python_cpp
()
{
internal_build_cpp
internal_install_python_deps
export
LD_LIBRARY_PATH
=
../src/.libs
# for Linux
export
DYLD_LIBRARY_PATH
=
../src/.libs
# for OS X
cd
python
# Only test Python 2.6/3.x on Linux
if
[
$(
uname
-s
)
==
"Linux"
]
;
then
...
...
@@ -333,6 +334,54 @@ build_javascript() {
cd
js
&&
npm
install
&&
npm
test
&&
cd
..
}
build_php5.5_c
()
{
ln
-sfn
/usr/bin/php5.5 /usr/bin/php
ln
-sfn
/usr/bin/php-config5.5 /usr/bin/php-config
ln
-sfn
/usr/bin/phpize5.5 /usr/bin/phpize
cd
php/tests
&&
/bin/bash ./test.sh
&&
cd
../..
}
build_php5.5
()
{
ln
-sfn
/usr/bin/php5.5 /usr/bin/php
ln
-sfn
/usr/bin/php-config5.5 /usr/bin/php-config
ln
-sfn
/usr/bin/phpize5.5 /usr/bin/phpize
rm
-rf
vendor
cp
-r
/usr/local/vendor-5.5 vendor
./vendor/bin/phpunit
}
build_php5.6_c
()
{
ln
-sfn
/usr/bin/php5.6 /usr/bin/php
ln
-sfn
/usr/bin/php-config5.6 /usr/bin/php-config
ln
-sfn
/usr/bin/phpize5.6 /usr/bin/phpize
cd
php/tests
&&
/bin/bash ./test.sh
&&
cd
../..
}
build_php5.6
()
{
ln
-sfn
/usr/bin/php5.6 /usr/bin/php
ln
-sfn
/usr/bin/php-config5.6 /usr/bin/php-config
ln
-sfn
/usr/bin/phpize5.6 /usr/bin/phpize
rm
-rf
vendor
cp
-r
/usr/local/vendor-5.6 vendor
./vendor/bin/phpunit
}
build_php7.0_c
()
{
ln
-sfn
/usr/bin/php7.0 /usr/bin/php
ln
-sfn
/usr/bin/php-config7.0 /usr/bin/php-config
ln
-sfn
/usr/bin/phpize7.0 /usr/bin/phpize
cd
php/tests
&&
/bin/bash ./test.sh
&&
cd
../..
}
build_php7.0
()
{
ln
-sfn
/usr/bin/php7.0 /usr/bin/php
ln
-sfn
/usr/bin/php-config7.0 /usr/bin/php-config
ln
-sfn
/usr/bin/phpize7.0 /usr/bin/phpize
rm
-rf
vendor
cp
-r
/usr/local/vendor-7.0 vendor
./vendor/bin/phpunit
}
# Note: travis currently does not support testing more than one language so the
# .travis.yml cheats and claims to only be cpp. If they add multiple language
# support, this should probably get updated to install steps and/or
...
...
@@ -363,7 +412,13 @@ Usage: $0 { cpp |
ruby21 |
ruby22 |
jruby |
ruby_all)
ruby_all |
php5.5 |
php5.5_c |
php5.6 |
php5.6_c |
php7.0 |
php7.0_c)
"
exit
1
fi
...
...
This diff is collapsed.
Click to expand it.
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