Created
October 25, 2011 16:19
-
-
Save nobeans/1313324 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GROOVYSERV_HOME=/usr/local/Cellar/groovyserv/0.9/libexec | |
TEMP_TEST_SCRIPT=/tmp/testGroovyServ.groovy | |
BUILT_GROOVY_CMD=target/install/bin/groovy | |
ant install -DskipTests=true -DskipOsgi=true | |
cat << EOS > $TEMP_TEST_SCRIPT | |
import org.jggug.kobo.groovyserv.* | |
def cookie = new Cookie() | |
def socket = new java.net.Socket('localhost', 9999) | |
def runnable = new Runnable() { | |
String id = 'ID' | |
void run() { 'hoge' } | |
} | |
new RequestWorker(cookie, socket).newTaskFor(runnable, null) | |
EOS | |
export CLASSPATH=$CLASSPATH:$GROOVYSERV_HOME/lib/* | |
$BUILT_GROOVY_CMD $TEMP_TEST_SCRIPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Before you use the script, run the command:
groovy -l 9999 -ne 'println line'