summaryrefslogtreecommitdiff
path: root/test/php
diff options
context:
space:
mode:
authorRoger Meier <roger@apache.org>2015-03-24 22:30:40 +0100
committerRoger Meier <roger@apache.org>2015-03-24 22:30:40 +0100
commit41ad4342c5a0389ab2cf2dbf098086413ac01204 (patch)
tree1ce9c7d4e70a7370f132ce5d4fd245a20a68e45e /test/php
parenta2d12b6ee3d9aa66f2c16dc6a5ee6eef5f1eba92 (diff)
downloadthrift-41ad4342c5a0389ab2cf2dbf098086413ac01204.tar.gz
THRIFT-847 Test Framework harmonization across all languages
THRIFT-2946 Enhance usability of cross test framework Patch: Nobuaki Sukegawa This closes: #358
Diffstat (limited to 'test/php')
-rwxr-xr-xtest/php/Makefile.am4
-rwxr-xr-xtest/php/TestClient.php8
2 files changed, 11 insertions, 1 deletions
diff --git a/test/php/Makefile.am b/test/php/Makefile.am
index 162590330..11974da0b 100755
--- a/test/php/Makefile.am
+++ b/test/php/Makefile.am
@@ -17,12 +17,14 @@
# under the License.
#
-THRIFT = $(top_srcdir)/compiler/cpp/thrift
+THRIFT = $(top_builddir)/compiler/cpp/thrift
stubs: ../ThriftTest.thrift
$(THRIFT) --gen php ../ThriftTest.thrift
$(THRIFT) --gen php:inlined ../ThriftTest.thrift
+precross: stubs
+
check: stubs
clean-local:
diff --git a/test/php/TestClient.php b/test/php/TestClient.php
index ea17435ae..4ec4eab26 100755
--- a/test/php/TestClient.php
+++ b/test/php/TestClient.php
@@ -60,6 +60,14 @@ if ($argc > 2) {
$host = $argv[1];
}
+foreach ($argv as $arg) {
+ if (substr($arg, 0, 7) == '--port=') {
+ $port = substr($arg, 7);
+ } else if (substr($arg, 0, 11) == '--transport=') {
+ $MODE = substr($arg, 11);
+ }
+}
+
$hosts = array('localhost');
$socket = new TSocket($host, $port);