Skip to content

Commit

Permalink
Integrate internal changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TeBoring committed Sep 20, 2016
1 parent b5bbdb0 commit 98835fb
Show file tree
Hide file tree
Showing 280 changed files with 19,691 additions and 8,179 deletions.
16 changes: 8 additions & 8 deletions conformance/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -251,31 +251,31 @@ conformance-csharp: $(other_language_protoc_outputs)

# Targets for actually running tests.
test_cpp: protoc_middleman conformance-test-runner conformance-cpp
./conformance-test-runner --failure_list failure_list_cpp.txt ./conformance-cpp
./conformance-test-runner --enforce_recommended --failure_list failure_list_cpp.txt ./conformance-cpp

test_java: protoc_middleman conformance-test-runner conformance-java
./conformance-test-runner --failure_list failure_list_java.txt ./conformance-java
./conformance-test-runner --enforce_recommended --failure_list failure_list_java.txt ./conformance-java

test_java_lite: protoc_middleman conformance-test-runner conformance-java-lite
./conformance-test-runner ./conformance-java-lite
./conformance-test-runner --enforce_recommended ./conformance-java-lite

test_csharp: protoc_middleman conformance-test-runner conformance-csharp
./conformance-test-runner --failure_list failure_list_csharp.txt ./conformance-csharp
./conformance-test-runner --enforce_recommended --failure_list failure_list_csharp.txt ./conformance-csharp

test_ruby: protoc_middleman conformance-test-runner $(other_language_protoc_outputs)
RUBYLIB=../ruby/lib:. ./conformance-test-runner --failure_list failure_list_ruby.txt ./conformance_ruby.rb
RUBYLIB=../ruby/lib:. ./conformance-test-runner --enforce_recommended --failure_list failure_list_ruby.txt ./conformance_ruby.rb

# These depend on library paths being properly set up. The easiest way to
# run them is to just use "tox" from the python dir.
test_python: protoc_middleman conformance-test-runner
./conformance-test-runner --failure_list failure_list_python.txt ./conformance_python.py
./conformance-test-runner --enforce_recommended --failure_list failure_list_python.txt ./conformance_python.py

test_python_cpp: protoc_middleman conformance-test-runner
./conformance-test-runner --failure_list failure_list_python_cpp.txt ./conformance_python.py
./conformance-test-runner --enforce_recommended --failure_list failure_list_python_cpp.txt ./conformance_python.py

if OBJC_CONFORMANCE_TEST

test_objc: protoc_middleman conformance-test-runner conformance-objc
./conformance-test-runner --failure_list failure_list_objc.txt ./conformance-objc
./conformance-test-runner --enforce_recomemnded --failure_list failure_list_objc.txt ./conformance-objc

endif
8 changes: 6 additions & 2 deletions conformance/conformance_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def do_test(request):
elif request.WhichOneof('payload') == 'json_payload':
try:
json_format.Parse(request.json_payload, test_message)
except json_format.ParseError as e:
except Exception as e:
response.parse_error = str(e)
return response

Expand All @@ -81,7 +81,11 @@ def do_test(request):
response.protobuf_payload = test_message.SerializeToString()

elif request.requested_output_format == conformance_pb2.JSON:
response.json_payload = json_format.MessageToJson(test_message)
try:
response.json_payload = json_format.MessageToJson(test_message)
except Exception as e:
response.serialize_error = str(e)
return response

except Exception as e:
response.runtime_error = str(e)
Expand Down
Loading

0 comments on commit 98835fb

Please sign in to comment.