Signed-off-by: Simon Xu <[email protected]>
---
 testcases/network/rpc/basic_tests/rpc01/Makefile   |  4 ++-
 .../rpc/basic_tests/rpc01/datafiles/Makefile       | 29 ++++++++++++++++++++++
 testcases/network/rpc/basic_tests/rpc01/rpc01      | 11 ++++----
 3 files changed, 37 insertions(+), 7 deletions(-)
 create mode 100644 testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile

diff --git a/testcases/network/rpc/basic_tests/rpc01/Makefile 
b/testcases/network/rpc/basic_tests/rpc01/Makefile
index ba3fe0a..732d816 100644
--- a/testcases/network/rpc/basic_tests/rpc01/Makefile
+++ b/testcases/network/rpc/basic_tests/rpc01/Makefile
@@ -29,4 +29,6 @@ CPPFLAGS              += -Wno-error
 
 INSTALL_TARGETS                := rpc01
 
-include $(top_srcdir)/include/mk/generic_leaf_target.mk
+SUBDIRS                        := datafiles
+
+include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile 
b/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile
new file mode 100644
index 0000000..7be4942
--- /dev/null
+++ b/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile
@@ -0,0 +1,29 @@
+#
+#    network/rpc/basic_tests/rpc01/datafiles Makefile.
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License along
+#    with this program; if not, write to the Free Software Foundation, Inc.,
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+#    Simon Xu <[email protected]> Nov 8 2013
+#
+
+top_srcdir             ?= ../../../../../..
+
+include $(top_srcdir)/include/mk/env_pre.mk
+
+INSTALL_DIR            := testcases/data/rpc01
+
+INSTALL_TARGETS                := file*
+
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc01 
b/testcases/network/rpc/basic_tests/rpc01/rpc01
index fd236b1..8ed69b0 100755
--- a/testcases/network/rpc/basic_tests/rpc01/rpc01
+++ b/testcases/network/rpc/basic_tests/rpc01/rpc01
@@ -36,9 +36,8 @@
 $trace_logic
 this_file=${0##*/}
 TC=${TC:=rpc01}
-TCbin=${TCbin:=`pwd`}
-TCdat=${TCdat:=$TCbin/datafiles}
-TCtmp=${TCtmp:=$LTPROOT/testcases/bin}
+TCbin=${TCbin:=$LTPROOT/testcases/bin}
+TCdat=${TCdat:=$LTPROOT/testcases/data/rpc01}
 NUMLOOPS=${NUMLOOPS:=3}
 RHOST=${RHOST:=`hostname`}
 CLEANUP=${CLEANUP:="ON"}
@@ -71,7 +70,7 @@ do_test()
     do
       for FILE in $DATAFILES
       do
-       $TCtmp/rpc1 -s $RHOST -f $TCdat/$FILE
+       rpc1 -s $RHOST -f $TCdat/$FILE
        [ $? -eq 0 ] || end_testcase "Fail on using $FILE"
       done
       COUNT=`expr $COUNT + 1`
@@ -93,9 +92,9 @@ do_cleanup()
     $trace_logic
 
     if [ "$CLEANUP" = "ON" ]; then
-       if [ -f $TCtmp/core ]; then
+       if [ -f $TMPDIR/core ]; then
           echo "Core file is saved in /tmp"
-          mv $TCtmp/core /tmp
+          mv $TMPDIR/core /tmp
        fi
 
        # Kill server
-- 
1.8.4.2


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to