THRIFT-847 Test Framework harmonization across all languages
perl fixes:
- generate Makfile for perl tests
- add inc path to test

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1229745 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/.gitignore b/.gitignore
index 77d215b..cfe1185 100644
--- a/.gitignore
+++ b/.gitignore
@@ -211,6 +211,8 @@
 /test/log/
 /test/test.log
 /test/perl/gen-*
+/test/perl/Makefile
+/test/perl/Makefile.in
 /test/php/gen-*
 /test/py/Makefile
 /test/py/Makefile.in
diff --git a/configure.ac b/configure.ac
index 8943cdb..0bbf4f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -492,6 +492,7 @@
   test/Makefile
   test/cpp/Makefile
   test/hs/Makefile
+  test/perl/Makefile
   test/py/Makefile
   test/py.twisted/Makefile
   test/rb/Makefile
diff --git a/test/perl/Makefile b/test/perl/Makefile.am
similarity index 87%
rename from test/perl/Makefile
rename to test/perl/Makefile.am
index e2d81d4..291106b 100644
--- a/test/perl/Makefile
+++ b/test/perl/Makefile.am
@@ -17,14 +17,13 @@
 # under the License.
 #
 
-# Default target is everything
-target: all
+THRIFT = $(top_srcdir)/compiler/cpp/thrift
 
-# Tools
-THRIFT = ../../compiler/cpp/thrift
-
-all: ../ThriftTest.thrift
+stubs: ../ThriftTest.thrift
 	$(THRIFT) --gen perl ../ThriftTest.thrift
 
-clean:
+check: stubs
+
+clean-local:
 	$(RM) -r gen-perl
+
diff --git a/test/test.sh b/test/test.sh
index b5bd308..ee74e75 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -114,6 +114,6 @@
         "cpp/TestServer" \
         "10"
 do_test "perl-cpp"  "binary" "buffered-ip" \
-        "perl -I perl/gen-perl/ perl/TestClient.pl" \
+        "perl -I perl/gen-perl/ -I../lib/perl/lib/ perl/TestClient.pl" \
         "cpp/TestServer" \
         "10"