Commit Graph

98 Commits

Author SHA1 Message Date
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