aboutsummaryrefslogtreecommitdiffhomepage
path: root/conformance/conformance.proto
diff options
context:
space:
mode:
authorGravatar Josh Haberman <jhaberman@gmail.com>2015-04-14 13:45:39 -0700
committerGravatar Josh Haberman <jhaberman@gmail.com>2015-04-15 14:56:05 -0700
commit4e63b52088ce409bbe43e4a37863d43b136143f0 (patch)
treefbd4b126e2f47dec22bf9fcf4dab618f70445f37 /conformance/conformance.proto
parent8fe135d212baeae8b754f08af9cb1854ad0b627f (diff)
Factored conformance tests so they can run in-process.
This is necessary for testing on iOS. Change-Id: I54ec1e3aa2e9fbfff9a6cd6580920a6a62069b63
Diffstat (limited to 'conformance/conformance.proto')
-rw-r--r--conformance/conformance.proto30
1 files changed, 13 insertions, 17 deletions
diff --git a/conformance/conformance.proto b/conformance/conformance.proto
index 34fec45f..0fb66cf9 100644
--- a/conformance/conformance.proto
+++ b/conformance/conformance.proto
@@ -32,27 +32,23 @@ syntax = "proto3";
package conformance;
// This defines the conformance testing protocol. This protocol exists between
-// the conformance tester process (the "tester") and the process whose protobuf
-// implemention is being tested (the "testee"). The tester forks the testee and
-// communicates with it over its stdin/stdout:
+// the conformance test suite itself and the code being tested. For each test,
+// the suite will send a ConformanceRequest message and expect a
+// ConformanceResponse message.
//
-// +--------+ pipe +----------+
-// | tester | <------> | testee |
-// | | | |
-// | C++ | | any lang |
-// +--------+ +----------+
+// You can either run the tests in two different ways:
//
-// The tester contains all of the test cases and their expected output.
-// The testee is a simple program written in the target language that reads
-// each test case and attempts to produce acceptable output for it.
+// 1. in-process (using the interface in conformance_test.h).
//
-// Every test consists of a ConformanceRequest/ConformanceResponse
-// request/reply pair. The protocol on the pipe is simply:
+// 2. as a sub-process communicating over a pipe. Information about how to
+// do this is in conformance_test_runner.cc.
//
-// 1. tester sends 4-byte length N
-// 2. tester sends N bytes representing a ConformanceRequest proto
-// 3. testee sends 4-byte length M
-// 4. testee sends M bytes representing a ConformanceResponse proto
+// Pros/cons of the two approaches:
+//
+// - running as a sub-process is much simpler for languages other than C/C++.
+//
+// - running as a sub-process may be more tricky in unusual environments like
+// iOS apps, where fork/stdin/stdout are not available.
// Represents a single test case's input. The testee should:
//