Commit Graph

168 Commits

Author SHA1 Message Date
Adam Cozzette
8645d893ab Merge branch '3.7.x' into merge-3-7-x 2019-03-26 14:32:20 -07:00
David Supplee
d65b8647f2 Add terminating character to zend_lookup_class call (#5871) (#5885)
* add terminating character

* adjust name length input

* add test cases

* correct script name

* Misc fixes

* add new script to EXTRA_DIST list
2019-03-13 13:31:55 -07:00
Jan Tattermusch
db1d4dc4c1
Merge pull request #5876 from jtattermusch/csharp_win_tests
C# testing improvements
2019-03-13 07:27:29 +01:00
David Supplee
93533f780b Add terminating character to zend_lookup_class call (#5871)
* add terminating character

* adjust name length input

* add test cases

* correct script name

* Misc fixes

* add new script to EXTRA_DIST list
2019-03-12 21:30:06 -07:00
Adam Cozzette
45aba801ed Avoid passing -Og flag to C++ compiler
It appears that some versions of Clang do not support this flag, and
this came up as a problem for Homebrew builds in issue #5815.
2019-03-12 10:15:50 -07:00
Jan Tattermusch
67fee07308 C#: set some dotnet options when testing 2019-03-12 05:16:52 -04:00
Hao Nguyen
f85c823c90
Create test to verify that the dist artifact can be installed. (#5854)
* Add a new test for verifying that the dist package can be installed.
2019-03-07 14:34:28 -08:00
Joshua Haberman
f5e8ee41dd
PHP updates for new upb APIs (#5604) 2019-03-06 12:04:17 -08:00
Bo Yang
cb6fa92ee8 Merge branch '3.7.x' 2019-03-04 10:18:18 -08:00
Yilun Chong
400845ae17 fix macos build for High Sierra (#5780)
* fix macos build by changing xcode version

* add comments

* fix benchmark build for mac

* fix for gem option and install npm

* add test for node and npm

* fix node

* fix for node

* another attempts to fix node

* another attempts

* clean up
2019-02-26 15:51:04 -08:00
Yilun Chong
89b914f81d
fix macos build for High Sierra (#5780)
* fix macos build by changing xcode version

* add comments

* fix benchmark build for mac

* fix for gem option and install npm

* add test for node and npm

* fix node

* fix for node

* another attempts to fix node

* another attempts

* clean up
2019-02-26 12:52:06 -08:00
Bo Yang
8400e29044 Divide commands into separate lines 2019-01-28 20:58:58 +00:00
Bo Yang
71e5de01d3 phpunit-5.6.10 link is broken
Use 5.6.8 instead
2019-01-28 20:57:51 +00:00
Adam Cozzette
d135f07bba
Do "strict" heapcheck instead of "draconian" (#5635)
The draconian heapcheck turns up memory leaks outside our control, such
as ones in libc and in the heapchecker itself. I think for an automated
test it makes more sense for us to use the "strict" heapcheck, since
that already passes and should only report leaks that are within our
control.
2019-01-25 10:28:52 -08:00
Hao Nguyen
4f8a635679
Create test for protoc with tcmalloc (#5612)
* Add TC malloc kokoro test

* Update tcmalloc test
2019-01-23 10:02:51 -08:00
Thomas Van Lenten
bd00671b92 ObjC: Add a Xcode project for tvOS.
The CocoaPod (and source) have always support tvOS, but adding the project
makes it easier to run the tests and debug if there ever were an issue.

(not adding a watchOS project at the moment because Apple doesn't provide
 XCTest, so all it could do is build the library. We still support that,
 just can't "test" it.)
2019-01-08 08:22:12 -05:00
Paul Yang
de9e1a04a6
Add ruby 2.6 test (#5528)
* Add ruby 2.6 test

* Fix broken tests

* Fix compatibility test

* Fix bundler version

* Use new docker image

* Fix broken test

* Use new docker image in ruby26 test

* Install ruby for mac
2019-01-03 14:25:50 -08:00
Yilun Chong
152c8301cf
Fix python benchmark throughput; Change back to not using docker for benchmar (#5503) 2018-12-20 17:15:51 -08:00
Paul Yang
4dec4f9371
Rebuild python docker image (#5475)
* Rebuild python docker image

* Update docker image

* Change call to build_and_run_docker.sh

* Set up python tests for different versions

* Fix comments
2018-12-18 18:07:24 -08:00
Yilun Chong
6adc3d74fb
Fix benchmark to use docker image on kokoro (#5481)
* Fix benchmark to use docker image on kokoro

* Deleted pure php benchmark and fix long time benchmark
2018-12-18 16:20:23 -08:00
Paul Yang
d7c4409589
Php 7.3 fix (#5434)
* Inherit from message instead of implement

When regestering class (implmenets other class) during MINIT, zend_class_implements
would call zend_class_entry->interface_gets_implemented(). In PHP-7.3 interface_gets_implemented shares the same location with create_object.
However, during MINIT, the global object storeage hasn't been initialized. And thus, caused segment fault in php 7.3.

* Use zend_string_init where interned string may be the value.
zend_string_dup will keep using the existing interned string.
In php 7.3, interned string cannot be destroyed from user's code.

* Uncommment debug code

* Use latest phpunit for each php versions

* Revert change in Dockerfile

* Update php test to use the new docker image

* Update composer

* Change docker organization

* Update phpunit

* Debug phpunit

* Store phpunit into bin dir in docker image

* Install valgrind to docker

* Fix compatibility test

* Remove generated_service_test from compatibility c extension test

* Update 32bit php test to the new docker image

* Install bison

* Fix build.sh

* Fix DOCKERIMAGE_PREFIX

* Fix basename

* Add comment to build_and_run_docker2.sh

* Remove commented code

* Fix comments
2018-12-18 10:57:03 -08:00
Paul Yang
acc0fc2a9e
Remove ruby21 and ruby22 tests (#5277)
* Remove ruby21 and ruby22 tests

* Update test badge
2018-10-22 15:09:36 -07:00
Paul Yang
333b3ceab6
Add ruby 2.3, 2.4 and 2.5 test for linux. (#5256)
* Add ruby 2.3, 2.4 and 2.5 test for linux.

* Update kokoro files

* Add back commented gc test

* Fix gc_test failure

* Remove unused code

* Update ruby 2.5.0 to 2.5.1

* Update ruby 2.3 to 2.3.8

* Remove useless comment
2018-10-18 11:16:55 -07:00
Paul Yang
39df66e1f7
Add ruby2.3,2.4.2.5 test on Mac and disable ruby2.1,2.2 test on Linux (#5250) 2018-10-12 12:36:33 -07:00
Ben Wolsieffer
56b40a8f05 Link to libatomic when necessary (eg. on armv6l) 2018-10-08 16:27:17 -04:00
michaelbausor
6a51c03823 PHP: Add support for primitive types in setters (#5126)
* Add support for primitive types in setters

* Update to address PR feedback

* Add tests and fixes for repeated fields

* Remove repeated field code, add getters

* Cleanup, test getters and oneofs

* Move boxing logic into separate class

* Add tests for wrapper type constructor args

* Update to add new setXXXValue methods

* Fix tests for invalid values

* Fix c extension for wrapper accessors

* Fix the bug that well known types didn't call Message_construct

* Address PR comments

* Refactoring init message with array logic

* Add include path to protoc

* Add missing TSRM_LS defintion

* Fix TSRM_LS

* Fix dist check
2018-10-07 16:56:41 -07:00
Yilun Chong
2b7ee3873e fix java build by changing mvn to online 2018-09-23 17:07:02 -07:00
Feng Xiao
a0a17e24d7 Fix go tests. 2018-08-23 15:35:52 -07:00
Feng Xiao
afe98de32a Replace repo links. 2018-08-22 11:55:30 -07:00
Feng Xiao
acd5b05e9f Fix failing tests.
1. Fix C++ tests.
  * Add missing files to Makefile.am and fix distcheck in tests.sh
  * Remove BUILT_SOURCES from conformance/Makefile.am.
  * Add some missing override keyword.
  * Add a type cast to int64 because our StrCat() in stubs can't handle size_t.
2. Fix Java tests.
  * Add missing test dependency on guava in pom.xml.
  * Include newly referenced test data in test resources.
  * Manually fix map_lite_test.proto which is overwritten because it's mapped
    from map_test.proto in google3.
  * Add back "optimize_for = LITE_RUNTIME" which is still needed to keep the
    opensource test passing as it's still running lite tests.
  * Add a type cast in newBuilder() because without it the code doesn't compile
    with openjdk javac 1.8 (the compiler can't figure if it's the right type
    due to complex generic typing).
3. Fix Python tests.
  * Remove/replace references to <hash_map>.
  * Suppress more warnings in setup.py.
  * Replace incorrect header inclusion for google/protobuf/proto_api.h.
  * Add strings::EndsWith to google/protobuf/stubs/strutil.h because it's
    referenced in the updated python C extension code.
  * Replace proto2 with google::protobuf. The proto2 name is leaked to
    opensource because we removed the subsitition rule for proto2 namespace
    but only fixed C++ source code and forgot to update python C extension code.
2018-08-09 21:21:01 -07:00
Feng Xiao
f0b8a57fe6 Cleanup kokoro scripts.
Changes:
1. Remove stuff no longer needed. Lots of the heavy lifting were there
because we were running our own jenkins cluster and had to manage all
the test logs ourselves. Now they are useless.
2. Change "-j2" to "-j4" to speed up the test a little bit. Kokoro
machines have 4 logic CPUs according to their spec.
2018-08-09 15:22:22 -07:00
Paul Yang
bdcbcabe5e
Add conformance test for php c back (#4966)
* Add conformance test for php c back

php c extension has different result for conformance test for different
php version and architecture. Try to add conformance back for php 7.1 c extension first.

* Disable conformance test for c extension on 32-bit architecture
32-bit and 64-bit have different failing tests

* Fix typo
2018-07-26 13:52:22 -07:00
Feng Xiao
9de4e64cf2 Add cpp tests under release docker image.
1. Added C++ tests under the release docker image.
2. Fixed a compile issue with the docker image.
3. Cleaned up tests.sh and removed traivis stuff.
2018-07-15 16:41:25 -07:00
Paul Yang
78ba021b84
Add continuous test for ruby 2.3, 2.4 and 2.5 (#4829)
* Add continuous test for ruby 2.3, 2.4 and 2.5

* Change ruby 2.5 to 2.5.0

* No need to provide argument to rb_funcall when argc is 0

* Fix tests for ruby 2.5

* Use rescue instead of assert_raise to accept subclass of error
2018-07-02 15:11:36 -07:00
Brent Shaffer
6737954661 PHP namespaces for nested messages and enums (#4536)
* uses namespaces for nested messages and enums

* fixes namespaces for PHP dist

* fixes namespace for Descriptors, adds Cardinality and Kind

* fixes nested namespaces for reserved words and adds tests

* adds tests and generator fix for php class prefixes

* fixes escaping of protobuf packages, enum comments, misc others

* nice refactor of generated code

* adds class files for backwards compatibility

* simplifies code with templates

* adds compatibility files to makefile

* cleanup of generator and fixes nested namespace bug

* regenerates proto types

* remove internal BC classes

* adds deprecated warning, adds methods back

* simplifies if statement

* fixes dist files

* addresses review comments

* adds back TYPE_URL_PREFIX constant

* adds @deprecated to old nested class files

* skips tests which require a separate process when protobuf.so is enabled

* Adds tests for legacy nested classes that do not require separate processes to test

* uses legacy names for GPBUtil message check

* adds block for IDE @deprecated message

* Namespace for nested message/enum in c extension

* Remove unused code
2018-05-24 13:39:41 -07:00
Jie Luo
5f9232b5e0
use brew install instead of easy_install in OSX (#4537)
use brew instead of easy_install in OSX (easy_install keep failing for a month)
2018-05-09 15:35:03 -07:00
Carlos O'Ryan
3c5442a95d Include googletest as a submodule (#3993)
Add googletest as a submodule in third_party/googletest.
2018-03-26 13:54:32 -07:00
Jisi Liu
4880027649 Cat the test-suite.log on errors for presubits 2018-03-19 16:13:36 -07:00
Jisi Liu
bb40c0c0c4
Merge pull request #4291 from google/3.5.x
Merge 3.5.x to master
2018-02-26 10:05:09 -08:00
Paul Yang
51293f36d8
Fix more memory leak for php c extension (#4211)
* Fix more memory leak for php c extension

* Fix memory leak for php5.5
2018-01-25 11:31:05 -08:00
Yilun Chong
4b0209140e add cpp 2017-12-14 17:26:16 -08:00
Yilun Chong
34843eddfe Fix bugs 2017-12-13 14:34:52 -08:00
Yilun Chong
5e732e35c1 Add caliper supported to java benchmark 2017-12-12 12:05:29 -08:00
Yilun Chong
1fd6c1761e Fix bugs to pass tests 2017-12-04 14:39:08 -08:00
Jon Skeet
9a9a66e715 Run C# codegen when testing it
This will cause failures if shared protos change in an incompatible
way.
2017-11-12 15:29:15 +00:00
Paul Yang
2df472690e
Fix php well known type conformance tests (#3828) (#3840)
* Fix php well known type conformance tests

* Properly generate code for test.proto

* Provide GPBMetadata files in c extensions for generated files to import.

* Remove unnecessary test

* Clean up code

* Add declaration for initOnce.

* Refactoring
2017-11-04 09:33:56 -07:00
Paul Yang
bcda919cee
Fix php well known type conformance tests (#3828)
* Fix php well known type conformance tests

* Properly generate code for test.proto

* Provide GPBMetadata files in c extensions for generated files to import.

* Remove unnecessary test

* Clean up code

* Add declaration for initOnce.

* Refactoring
2017-11-03 12:30:09 -07:00
Jisi Liu
de15e73d58 Merge remote-tracking branch 'origin/3.4.x' into master 2017-10-11 14:44:03 -07:00
Paul Yang
77f64bb777 Add well known types to php runtime. (#3697)
* Add well known types to php runtime.

* Fix php7.0 tests

* No longer generate empty.proto in test as it has been included in
runtime.

* Fix zts build

* Clean code

* Rename g_p_b_empty to empty.

* Don't generate code for empty.proto in compatibility test

* Fix 32-bit

* Fix mac build

* Fix Makefile.am to add new files
2017-10-05 21:03:57 -07:00
Feng Xiao
8136ccb296 Fix go example test.
It needs "-I" flag to find imported file google/protobuf/timestamp.proto
2017-09-13 17:04:13 -07:00
Bo Yang
f46a01d0c1 Exclude valid constant name from reserved name. 2017-09-12 15:04:34 -07:00
Bo Yang
e5d000cbb7 Add prefix to php reserved keywords. 2017-09-08 15:17:36 -07:00
Jisi Liu
d8c6193d2c Add mising cmake files in dist 2017-08-24 14:11:37 -07:00
Jisi Liu
55fdbe58f0 Make distcheck aware of test proto files. 2017-08-23 11:35:48 -07:00
Jie Luo
610e433888 Drop python2.6
Jenkins complains for python 2.6
DEPRECATION: Python 2.6 is no longer supported by the Python core team
ERROR: InvocationError: '/tmp/protobuf/protobuf/python/.tox/py26-cpp/bin/python setup.py -q build_py'
https://grpc-testing.appspot.com/job/protobuf_pull_request/1502/testReport/junit/(root)/python_cpp/python_cpp/
2017-08-22 16:39:26 -07:00
Jie Luo
028d6f13ee Add Python 3.5 3.6 2017-08-22 15:59:27 -07:00
Jie Luo
c2aa26e507 Revert "Drop Python 3.3 from testing & add Python 3.5, 3.6 (#3512)" (#3524)
This reverts commit 703f414ca6.
2017-08-18 13:15:06 -07:00
cclauss
703f414ca6 Drop Python 3.3 from testing & add Python 3.5, 3.6 (#3512)
* Drop Python 3.3 from testing & add Python 3.5, 3.6

Python 3.3 goes [EOL](https://docs.python.org/devguide/index.html#branchstatus) next month.

* Sync test.sh with the Python versions in tox.ini
2017-08-18 10:14:00 -07:00
Jie Luo
fae381693f Merge pull request #3454 from anandolee/master
Add python 2.6 test back for cpp implementation.
2017-08-07 11:04:09 -07:00
Jie Luo
d58df3b902 Add python 2.6 test back for cpp implementation. Json format issue was fixed in #869 2017-08-03 16:04:10 -07:00
Paul Yang
c15a3269f9 Expose descriptor API in php c extension (#3422) 2017-08-02 07:42:27 -07:00
Axel Huebl
74dcf447af
Travis: Exclude CMake .pc files
Exclude the unconfigured .pc input files of the CMake
based install: they shall not be packed/distributed,
only their outputs are
2017-07-23 20:48:02 +02:00
Paul Yang
50aa4febaf Merge pull request #3375 from TeBoring/3.3.x
Merge 3.3.x into master
2017-07-19 06:58:05 -07:00
Bo Yang
6ec0b7e4d1 Merge 3.3.x into master 2017-07-18 11:06:16 -07:00
Matt A
9e745f771b Support PHP generic services (#3269)
* Add php_generic_services option

* Generate PHP generic services

* Respect namespaces for generated PHP services

* Test PHP generated services

* Rename PHP generator service method doc comment function

* Correct phpdoc service method case

* Test namespaced PHP generic services

* Always use the FQCN for PHP generic service input/output

* Add generated_service_test to php test.sh

* Add php service test protos to CI

* Add php service files to php_EXTRA_DIST

* Use Interface suffix for php generic services
2017-07-18 07:45:18 -07:00
Paul Yang
ecca6ea95d Add json encode/decode for php. (#3226)
* Add json encode/decode for php.

* Fix php conformance test on 32-bit machines.

* Fix conformance test for c extension.

* Fix comments
2017-06-30 12:14:09 -07:00
Paul Yang
6f325805c0 Add new file option php_namespace. (#3162)
* Add new file option php_namespace.

Use this option to change the namespace of php generated classes.
Default is empty. When this option is empty, the package name will be
used for determining the namespace.

* Uncomment commented tests

* Revert gdb test change

* Update csharp descriptor.

* Add test for empty php_namespace.
2017-06-05 00:10:18 -07:00
Jon Skeet
f26e8c2ae0 Convert C# projects to MSBuild (csproj) format
This has one important packaging change: the netstandard version now
depends (implicitly) on netstandard1.6.1 rather than on individual
packages. This is the preferred style of dependency, and shouldn't
affect any users - see http://stackoverflow.com/questions/42946951
for details.

The tests are still NUnit, but NUnit doesn't support "dotnet test"
yet; the test project is now an executable using NUnitLite. (When
NUnit supports dotnet test, we can adapt to it.)

Note that the project will now only work in Visual Studio 2017 (and
Visual Studio Code, and from the command line with the .NET Core
1.0.0 SDK); Visual Studio 2015 does *not* support this project file
format.
2017-05-24 09:07:33 +01:00
Paul Yang
22319315df Fix c extension for php7.1. (#3077) 2017-05-10 15:59:59 -07:00
Paul Yang
25abd7b7e7 Add compatibility test for php. (#3041)
* Add compatibility test for php.

* Revert API incompatible change.
2017-05-05 11:14:11 -07:00
Paul Yang
4523c9c233 Allow proto files to import descriptor.proto (#2995)
descriptor.proto uses proto2 syntax, which is not ready for external
usage. However, some proto3 files import descriptor.proto and cannot be
used. In this PR, all references (We cheated by only removing
extensions, which is enough for now. User should avoid using messages
defined in descriptor.proto as field type.) to content in
descriptor.proto are removed from generated files. Those that import
descriptor.proto can be used like other proto files.
2017-04-20 16:55:56 -07:00
Paul Yang
190b5270c8 Make PHP c extension work with PHP7 (#2951) 2017-04-19 16:23:51 -07:00
Joshua Haberman
c565e25c7d Merge pull request #1662 from haberman/jsconformance
Conformance tests for JavaScript (Node.js). 15 tests are failing.
2017-03-27 12:03:09 -07:00
Paul Yang
6b27c1f981 Add file option php_class_prefix (#2849)
This option will be prepended to generated classes of all messages in
the containing file.
2017-03-17 11:08:06 -07:00
Paul Yang
dd8d5f57d7 Rename encode/decode to serializeToString/mergeFromString (#2795)
This better shows the semantic of the API. For already setted fields,
mergeFromString do replacement for singular fields and appending for
repeated fields.
2017-03-08 14:31:34 -08:00
Josh Haberman
f873d3213c Added JavaScript conformance tests. All tests pass! 2017-03-06 10:42:27 -08:00
Jie Luo
3f6f73b796 Merge pull request #2701 from anandolee/master
Add csharp compatibility tests against v3.0.0
2017-02-13 10:54:34 -08:00
Paul Yang
74eb9a0a30 Add clear method to PHP message (#2700) 2017-02-11 16:36:17 -08:00
Jie Luo
7288689d8c Add csharp compatibility tests against v3.0.0 and run on Travis. 2017-02-10 13:40:16 -08:00
Paul Yang
cba04b19e8 Implement json encoding decoding for php. (#2682) 2017-02-08 10:27:54 -08:00
Paul Yang
c00274313d Add fixed version to phpunit used in travis (#2673) 2017-02-07 10:55:48 -08:00
Paul Yang
39756643df Add conformance test for php (#2655) 2017-02-01 12:47:58 -08:00
Jie Luo
ea51149100 Add python compatibility tests against v2.5.0 amd run on Travis. 2017-01-26 11:05:16 -08:00
Sergio Campama
1ac8944294 Reenable cocoapods objc test and remove unnecessary workaround for rvm 2016-12-09 11:26:11 -05:00
Thomas Van Lenten
e43f73e099 Merge pull request #2473 from thomasvl/update_xcodes
Update xcode version support and travis usage
2016-12-09 11:15:06 -05:00
Thomas Van Lenten
bc9d0774f3 Skip benchmark test if cmake isn't installed. 2016-12-09 10:16:21 -05:00
Thomas Van Lenten
2754586fa4 Xcode 8.1 support
- Add entries to objectivec/DevTools/full_mac_build.sh
- Support `-quiet` via an option on full_mac_build.sh. NOTE: we don't use
  this on travis because the lack of output for a long time could cause travis
  to kill the build (when we get a slow VM).
- Update travis config to use newer images.
2016-12-09 10:15:40 -05:00
Paul Yang
d8f54c4206 Disable jruby test. (#2469)
Missed in #2467.
2016-12-08 16:27:56 -08:00
Paul Yang
e3e38b81cc Update commit id in Dockerfile to trigger update. (#2467) 2016-12-08 14:39:20 -08:00
Paul Yang
46ae90dc5e Make php generated code conform to PSR-4. (#2435)
1. Generate single file for each message.
2. Lazily initiate metadata.
2016-12-08 11:16:49 -08:00
Feng Xiao
599613e4c4 Update EXTRA_DIST lists. 2016-11-18 15:36:28 -08:00
Paul Yang
df8390790a Fix php c extension on 32-bit machines. (#2348) 2016-11-10 11:20:50 -08:00
Paul Yang
1f2dbc899b Implement RepeatedFieldIter for c extension. (#2333) 2016-11-08 11:38:34 -08:00
Paul Yang
51c5ff889c Fix pure php implementation for 32-bit machine. (#2282) 2016-10-25 17:27:05 -07:00
Paul Yang
daba6653f1 Fix python_cpp test on Mac. Link staticly when building extension, so that the extension doesn't require installing protobuf library. (#2232) 2016-10-10 11:44:54 -07:00
Bo Yang
63448e6059 Fix compile error for php on Mac. 2016-10-10 11:44:54 -07:00
Bo Yang
4f3d20a500 Fix segmentation fault when ZTS is defined. 2016-10-10 11:44:54 -07:00
Bo Yang
c96dd669a9 Add test for php zts build. 2016-10-10 11:44:54 -07:00
Bo Yang
34cdaf4c36 Add travis test on Mac for php. 2016-10-10 11:44:54 -07:00
Bo Yang
c8bd36e5b9 Test php5.5_c test on jenkins 2016-10-10 11:44:54 -07:00