diff options
author | Jon Skeet <jonskeet@google.com> | 2015-08-04 10:01:40 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-08-05 07:09:40 +0100 |
commit | b6defa7c115a19d3671b2a6c5ebab2a471d273ea (patch) | |
tree | 5744f5a9748aefaf50eb4dda45a5d874a5bd4a69 | |
parent | 044c36ebef20f66a9a8b0548f52b81692d779ac7 (diff) | |
download | protobuf-b6defa7c115a19d3671b2a6c5ebab2a471d273ea.tar.gz protobuf-b6defa7c115a19d3671b2a6c5ebab2a471d273ea.tar.bz2 protobuf-b6defa7c115a19d3671b2a6c5ebab2a471d273ea.zip |
Added C# conformance tests.
The tests are run from Travis in the same way as on other
platforms. Currently some expected failures - but only expected
in that they're what we got to start with. Will try to fix them in
other pull requests.
-rw-r--r-- | conformance/Makefile.am | 14 | ||||
-rw-r--r-- | conformance/failure_list_csharp.txt | 22 | ||||
-rwxr-xr-x | travis.sh | 6 |
3 files changed, 41 insertions, 1 deletions
diff --git a/conformance/Makefile.am b/conformance/Makefile.am index 97251715..c74eb1c8 100644 --- a/conformance/Makefile.am +++ b/conformance/Makefile.am @@ -40,7 +40,7 @@ $(protoc_outputs): protoc_middleman BUILT_SOURCES = $(protoc_outputs) -CLEANFILES = $(protoc_outputs) protoc_middleman javac_middleman conformance-java +CLEANFILES = $(protoc_outputs) protoc_middleman javac_middleman conformance-java conformance-csharp MAINTAINERCLEANFILES = \ Makefile.in @@ -55,6 +55,15 @@ conformance-java: javac_middleman @echo 'java -classpath .:../java/target/classes ConformanceJava "$$@"' >> conformance-java @chmod +x conformance-java +# Currently the conformance code is alongside the rest of the C# +# source, as it's easier to maintain there. We assume we've already +# built that, so we just need a script to run it. +conformance-csharp: + @echo "Writing shortcut script conformance-csharp..." + @echo '#! /bin/sh' > conformance-csharp + @echo 'mono ../csharp/src/Google.Protobuf.Conformance/bin/Release/Google.Protobuf.Conformance.exe "$$@"' >> conformance-csharp + @chmod +x conformance-csharp + # 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 @@ -62,5 +71,8 @@ test_cpp: protoc_middleman conformance-test-runner conformance-cpp test_java: protoc_middleman conformance-test-runner conformance-java ./conformance-test-runner ./conformance-java +test_csharp: protoc_middleman conformance-test-runner conformance-csharp + ./conformance-test-runner --failure_list failure_list_csharp.txt ./conformance-csharp + test_ruby: protoc_middleman conformance-test-runner RUBYLIB=../ruby/lib:. ./conformance-test-runner --failure_list failure_list_ruby.txt ./conformance_ruby.rb diff --git a/conformance/failure_list_csharp.txt b/conformance/failure_list_csharp.txt new file mode 100644 index 00000000..34846589 --- /dev/null +++ b/conformance/failure_list_csharp.txt @@ -0,0 +1,22 @@ +ProtobufInput.PrematureEofBeforeUnknownValue.BOOL +ProtobufInput.PrematureEofBeforeUnknownValue.BYTES +ProtobufInput.PrematureEofBeforeUnknownValue.DOUBLE +ProtobufInput.PrematureEofBeforeUnknownValue.ENUM +ProtobufInput.PrematureEofBeforeUnknownValue.FIXED32 +ProtobufInput.PrematureEofBeforeUnknownValue.FIXED64 +ProtobufInput.PrematureEofBeforeUnknownValue.FLOAT +ProtobufInput.PrematureEofBeforeUnknownValue.INT32 +ProtobufInput.PrematureEofBeforeUnknownValue.INT64 +ProtobufInput.PrematureEofBeforeUnknownValue.MESSAGE +ProtobufInput.PrematureEofBeforeUnknownValue.SFIXED32 +ProtobufInput.PrematureEofBeforeUnknownValue.SFIXED64 +ProtobufInput.PrematureEofBeforeUnknownValue.SINT32 +ProtobufInput.PrematureEofBeforeUnknownValue.SINT64 +ProtobufInput.PrematureEofBeforeUnknownValue.STRING +ProtobufInput.PrematureEofBeforeUnknownValue.UINT32 +ProtobufInput.PrematureEofBeforeUnknownValue.UINT64 +ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE +ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE +ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.BYTES +ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.MESSAGE +ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.STRING @@ -29,6 +29,11 @@ build_cpp_distcheck() { } build_csharp() { + # Just for the conformance tests. We don't currently + # need to really build protoc, but it's simplest to keep with the + # conventions of the other builds. + internal_build_cpp + # Install latest version of Mono sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list @@ -39,6 +44,7 @@ build_csharp() { (cd csharp/src; mono ../../nuget.exe restore) csharp/buildall.sh + cd conformance && make test_csharp && cd .. } use_java() { |