THRIFT-847 Test Framework harmonization across all languages
THRIFT-2946 Enhance usability of cross test framework

Patch: Nobuaki Sukegawa

This closes: #358
diff --git a/test/tests.json b/test/tests.json
index 5abafdf..c428786 100644
--- a/test/tests.json
+++ b/test/tests.json
@@ -1,280 +1,344 @@
-{
-    "client": [
-        {
-            "description": "Python TestClient",
-            "lib": "py",
-            "executable": "py/TestClient.py",
-            "exit": "hard",
-            "extra_args":  ["--genpydir=gen-py"],
-            "protocols": [
-                "binary",
-                "compact",
-                "json",
-                "accel"
-            ],
-            "transports": [
-                "buffered",
-                "framed"
-            ],
-            "sockets": [
-                "ip",
-                "ip-ssl"
-            ],
-            "platform": [
-                "Linux"
-            ]
-        },
-        {
-            "description": "C++ TestClient",
-            "lib": "cpp",
-            "executable": "cpp/TestClient",
-            "exit": "hard",
-            "protocols": [
-                "binary",
-                "compact",
-                "json"
-            ],
-            "transports": [
-                "buffered",
-                "framed",
-                "http"
-            ],
-            "sockets": [
-                "ip",
-                "ip-ssl",
-                "domain"
-            ],
-            "platform": [
-                "Linux"
-            ]
-        },
-        {
-            "description": "Nodejs TestClient",
-            "lib": "nodejs",
-            "executable": "../lib/nodejs/test/client.js",
-            "exit": "soft",
-            "protocols": [
-                "binary",
-                "compact",
-                "json"
-            ],
-            "transports": [
-                "buffered",
-                "framed"
-            ],
-            "sockets": [
-                "ip",
-                "ip-ssl"
-            ],
-            "platform": [
-                "Linux"
-            ]
-        },
-        {
-            "description": "Ruby TestClient",
-            "lib": "ruby",
-            "executable": "rb/integration/TestClient.rb",
-            "exit": "soft",
-            "protocols": [
-                "binary",
-                "compact",
-                "json",
-                "accel"
-            ],
-            "transports": [
-                "buffered",
-                "framed"
-            ],
-            "sockets": [
-                "ip"
-            ],
-            "platform": [
-                "Linux"
-            ]
-        },
-        {
-            "description": "Java TestClient",
-            "lib": "java",
-            "executable": ["ant","-f","../lib/java/build.xml","-Dno-gen-thrift=\"\""],
-            "extra_args": ["run-testclient"],
-            "exit": "hard",
-            "protocols": [
-                "binary",
-                "compact",
-                "json"
-            ],
-            "transports": [
-                "buffered",
-                "framed",
-                "fastframed",
-                "http"
-            ],
-            "sockets": [
-                "ip",
-                "ip-ssl"
-            ],
-            "platform": [
-                "Linux"
-            ]
-        },
-        {
-            "description": "Haskell TestClient",
-            "lib": "hs",
-            "executable": "hs/TestClient",
-            "exit": "hard",
-            "protocols": [
-                "binary",
-                "compact",
-                "json"
-            ],
-            "transports": [
-                "buffered"
-            ],
-            "sockets": [
-                "ip"
-            ],
-            "platform": [
-                "Linux"
-            ]
-        }
+[
+  {
+    "name": "c_glib",
+    "platforms": [
+      "Linux"
     ],
-    "server": [
-        {
-            "description": "Python TSimpleServer",
-            "lib": "py",
-            "executable": "py/TestServer.py",
-            "extra_args": ["--genpydir=gen-py", "TSimpleServer"],
-            "extra_delay": 0,
-            "exit": "soft",
-            "protocols": [
-                "binary",
-                "compact",
-                "json",
-                "accel"
-            ],
-            "transports": [
-                "buffered",
-                "framed"
-            ],
-            "sockets": [
-                "ip",
-                "ip-ssl"
-            ],
-            "platform": [
-                "Linux"
-            ]
-        },
-        {
-            "description": "C++ TestServer",
-            "lib": "cpp",
-            "executable": "cpp/TestServer",
-            "exit": "hard",
-            "protocols": [
-                "binary",
-                "compact",
-                "json"
-            ],
-            "transports": [
-                "buffered",
-                "framed",
-                "http"
-            ],
-            "sockets": [
-                "ip",
-                "ip-ssl",
-                "domain"
-            ],
-            "platform": [
-                "Linux"
-            ]
-        },
-        {
-            "description": "Ruby TestServer",
-            "lib": "ruby",
-            "executable": "rb/integration/TestServer.rb",
-            "exit": "soft",
-            "protocols": [
-                "binary",
-                "compact",
-                "json",
-                "accel"
-            ],
-            "transports": [
-                "buffered",
-                "framed"
-            ],
-            "sockets": [
-                "ip"
-            ],
-            "platform": [
-                "Linux"
-            ]
-        },
-        {
-            "description": "Nodejs TestServer",
-            "lib": "nodejs",
-            "executable": "../lib/nodejs/test/server.js",
-            "exit": "soft",
-            "protocols": [
-                "binary",
-                "compact",
-                "json"
-            ],
-            "transports": [
-                "buffered",
-                "framed"
-            ],
-            "sockets": [
-                "ip",
-                "ip-ssl"
-            ],
-            "platform": [
-                "Linux"
-            ]
-        },
-        {
-            "description": "Java TestServer",
-            "lib": "java",
-            "executable": ["ant","-f","../lib/java/build.xml","-Dno-gen-thrift=\"\""],
-            "extra_args": ["run-testserver"],
-            "exit": "hard",
-            "protocols": [
-                "binary",
-                "compact",
-                "json"
-            ],
-            "transports": [
-                "buffered",
-                "framed",
-                "fastframed"
-            ],
-            "sockets": [
-                "ip",
-                "ip-ssl"
-            ],
-            "platform": [
-                "Linux"
-            ]
-        },
-        {
-            "description": "Haskell TestServer",
-            "lib": "hs",
-            "executable": "hs/TestServer",
-            "exit": "hard",
-            "protocols": [
-                "binary",
-                "compact",
-                "json"
-            ],
-            "transports": [
-                "buffered"
-            ],
-            "sockets": [
-                "ip"
-            ],
-            "platform": [
-                "Linux"
-            ]
-        }
-    ]
-}
+    "server": {
+      "delay": 1,
+      "command": [
+        "test_server"
+      ]
+    },
+    "client": {
+      "command": [
+        "test_client"
+      ]
+    },
+    "transports": [
+      "buffered",
+      "framed"
+    ],
+    "sockets": [
+      "ip"
+    ],
+    "protocols": [
+      "binary"
+    ],
+    "workdir": "c_glib"
+  },
+  {
+    "name": "go",
+    "server": {
+      "delay": 1,
+      "command": [
+        "testserver",
+        "--certPath=../../keys"
+      ]
+    },
+    "client": {
+      "timeout": 6,
+      "command": [
+        "testclient"
+      ]
+    },
+    "transports": [
+      "buffered",
+      "framed"
+    ],
+    "sockets": [
+      "ip",
+      "ip-ssl"
+    ],
+    "protocols": [
+      "binary",
+      "compact",
+      "json"
+    ],
+    "workdir": "go/bin"
+  },
+  {
+    "name": "java",
+    "join_args": true,
+    "command": [
+      "ant",
+      "-f",
+      "build.xml",
+      "-Dno-gen-thrift=\"\"",
+      "-Dtestargs"
+    ],
+    "prepare": [
+      "ant",
+      "-f",
+      "build.xml",
+      "compile-test"
+    ],
+    "server": {
+      "delay": 5,
+      "extra_args": ["run-testserver"]
+    },
+    "client": {
+      "timeout": 13,
+      "extra_args": ["run-testclient"],
+      "transports": [
+        "http"
+      ]
+    },
+    "transports": [
+      "buffered",
+      "framed",
+      "framed:fastframed"
+    ],
+    "sockets": [
+      "ip-ssl",
+      "ip"
+    ],
+    "protocols": [
+      "compact",
+      "binary",
+      "json"
+    ],
+    "workdir": "../lib/java"
+  },
+  {
+    "name": "nodejs",
+    "env": {
+      "NODE_PATH": "../lib"
+    },
+    "server": {
+      "delay": 1,
+      "command": [
+        "node",
+        "server.js",
+        "--type=tcp"
+      ]
+    },
+    "client": {
+      "timeout": 2.9,
+      "command": [
+        "node",
+        "client.js",
+        "--type=tcp"
+      ]
+    },
+    "transports": [
+      "buffered",
+      "framed"
+    ],
+    "sockets": [
+      "ip-ssl",
+      "ip"
+    ],
+    "protocols": [
+      "compact",
+      "binary",
+      "json"
+    ],
+    "workdir": "../lib/nodejs/test"
+  },
+  {
+    "name": "hs",
+    "server": {
+      "command": [
+        "TestServer"
+      ]
+    },
+    "client": {
+      "timeout": 6,
+      "command": [
+        "TestClient"
+      ]
+    },
+    "transports": [
+      "buffered",
+      "framed",
+      "http",
+      "http:evhttp"
+    ],
+    "sockets": [
+      "ip",
+      "ip-ssl"
+    ],
+    "protocols": [
+      "compact",
+      "binary",
+      "json"
+    ],
+    "workdir": "hs"
+  },
+  {
+    "name": "py",
+    "server": {
+      "delay": 1,
+      "extra_args": ["TSimpleServer"],
+      "command": [
+        "TestServer.py",
+        "--genpydir=gen-py"
+      ]
+    },
+    "client": {
+      "timeout": 10,
+      "command": [
+        "TestClient.py",
+        "--host=localhost",
+        "--genpydir=gen-py"
+      ]
+    },
+    "transports": [
+      "buffered",
+      "framed"
+    ],
+    "sockets": [
+      "ip-ssl",
+      "ip"
+    ],
+    "protocols": [
+      "compact",
+      "binary",
+      "json",
+      "binary:accel"
+    ],
+    "workdir": "py"
+  },
+  {
+    "name": "cpp",
+    "server": {
+      "delay": 2,
+      "command": [
+        "TestServer"
+      ]
+    },
+    "client": {
+      "timeout": 8,
+      "command": [
+        "TestClient"
+      ]
+    },
+    "transports": [
+      "buffered",
+      "http",
+      "framed"
+    ],
+    "sockets": [
+      "ip-ssl",
+      "ip",
+      "domain"
+    ],
+    "protocols": [
+      "compact",
+      "binary",
+      "json"
+    ],
+    "workdir": "cpp"
+  },
+  {
+    "name": "rb",
+    "server": {
+      "delay": 1,
+      "command": [
+        "ruby",
+        "../integration/TestServer.rb"
+      ]
+    },
+    "client": {
+      "timeout": 5,
+      "command": [
+        "ruby",
+        "../integration/TestClient.rb",
+        "--host=127.0.0.1"
+      ]
+    },
+    "transports": [
+      "buffered",
+      "framed"
+    ],
+    "sockets": [
+      "ip"
+    ],
+    "protocols": [
+      "compact",
+      "binary",
+      "json",
+      "binary:accel"
+    ],
+    "workdir": "rb/gen-rb"
+  },
+  {
+    "name": "csharp",
+    "env": {
+      "MONO_PATH": "../.."
+    },
+    "transports": [
+      "buffered",
+      "framed"
+    ],
+    "sockets": [
+      "ip",
+      "ip-ssl"
+    ],
+    "protocols": [
+      "binary",
+      "compact",
+      "json"
+    ],
+    "server": {
+      "delay": 3,
+      "command": [
+        "TestClientServer.exe",
+        "server",
+        "--cert=../../../../test/keys/server.pem"
+      ]
+    },
+    "client": {
+      "timeout": 9,
+      "command": [
+        "TestClientServer.exe",
+        "client",
+        "--cert=../../../../test/keys/client.pem"
+      ]
+    },
+    "workdir": "../lib/csharp/test/ThriftTest"
+  },
+  {
+    "name": "perl",
+    "client": {
+      "transports": [
+        "buffered"
+      ],
+      "sockets": [
+        "ip"
+      ],
+      "protocols": [
+        "binary"
+      ],
+      "command": [
+        "perl",
+        "-Igen-perl/",
+        "-I../../lib/perl/lib/",
+        "TestClient.pl"
+      ]
+    },
+    "workdir": "perl"
+  },
+  {
+    "name": "php",
+    "client": {
+      "timeout": 6,
+      "transports": [
+        "buffered",
+        "framed"
+      ],
+      "sockets": [
+        "ip"
+      ],
+      "protocols": [
+        "binary"
+      ],
+      "command": [
+        "php",
+        "TestClient.php"
+      ]
+    },
+    "workdir": "php"
+  }
+]