From 3fb4f1ec92052c2615fe489747509ce74e9f808a Mon Sep 17 00:00:00 2001 From: Bryan Duxbury Date: Tue, 24 Mar 2009 00:36:00 +0000 Subject: [PATCH] THRIFT-392. hs: Make test scripts easier to use git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757620 13f79535-47bb-0310-9956-ffa450edef68 --- test/hs/runclient.sh | 13 +++++++++++-- test/hs/runserver.sh | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/test/hs/runclient.sh b/test/hs/runclient.sh index 3dace0af..298441f5 100644 --- a/test/hs/runclient.sh +++ b/test/hs/runclient.sh @@ -1,2 +1,11 @@ -#!/bin/bash -ghci -fglasgow-exts -i/home/iproctor/code/projects/thrift/trunk/lib/hs/src -igen-hs Client.hs +#!/bin/sh + +if [ -z $BASE_PKG ]; then + BASE_PKG=`ghc-pkg --simple-output list base-3* | sed -e "s/.*\(base-3\(.[0-9]\){3}\).*/\1/"` +fi + +if [ -z $BASE ]; then + BASE=../.. +fi + +ghci -fglasgow-exts -package $BASE_PKG -hide-package syb -i$BASE/lib/hs/src -i$BASE/test/hs/gen-hs Client.hs diff --git a/test/hs/runserver.sh b/test/hs/runserver.sh index c0901555..8a953bbe 100644 --- a/test/hs/runserver.sh +++ b/test/hs/runserver.sh @@ -1,2 +1,12 @@ -#!/bin/bash -ghci -fglasgow-exts -i/home/iproctor/code/projects/thrift/trunk/lib/hs/src -igen-hs Server.hs +#!/bin/sh + +if [ -z $BASE_PKG ]; then + BASE_PKG=`ghc-pkg --simple-output list base-3* | sed -e "s/.*\(base-3\(.[0-9]\){3}\).*/\1/"` +fi + +if [ -z $BASE ]; then + BASE=../.. +fi + +printf "Starting server... " +ghc -fglasgow-exts -package $BASE_PKG -hide-package syb -i$BASE/lib/hs/src -i$BASE/test/hs/gen-hs Server.hs -e "putStrLn \"ready.\" >> Server.main" -- 2.17.1