Author: challngr Date: Mon Jul 8 19:25:48 2013 New Revision: 1500894 URL: http://svn.apache.org/r1500894 Log: UIMA-3055 Move system test scripting into its own directory. Update system test scripting for split of ducc_util.py.
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/prepare uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/runducc uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/service uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/start_sim Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/prepare URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/prepare?rev=1500894&r1=1500893&r2=1500894&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/prepare (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/prepare Mon Jul 8 19:25:48 2013 @@ -46,8 +46,7 @@ import getopt import random os.environ['DUCC_HOME'] = os.path.abspath('../..') -DUCC_HOME=os.environ['DUCC_HOME'] -sys.path.append(DUCC_HOME + '/admin') +sys.path.append(os.environ['DUCC_HOME'] + '/admin') from ducc_util import DuccUtil from ducc_util import DuccProperties @@ -210,10 +209,12 @@ class Prepare(DuccUtil): def main(self, argv): if ( len(argv) < 1 ): - self.usage("Missing properties") + self.usage("Missing 'prepare' properties.") inprops = argv[0] - print 'inprops', inprops + if inprops in ('-h', '-?', '--help', '-help'): + self.usage(None) + self.testdir = os.path.dirname(inprops) props = DuccProperties() props.load(inprops) Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/runducc URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/runducc?rev=1500894&r1=1500893&r2=1500894&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/runducc (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/runducc Mon Jul 8 19:25:48 2013 @@ -39,15 +39,8 @@ import signal from threading import * import Queue -if ( not os.environ.has_key('DUCC_HOME') ): - os.environ['DUCC_HOME'] = os.path.abspath('../..') - DUCC_HOME=os.environ['DUCC_HOME'] - print 'Environment variable DUCC_HOME is missing, using default.' -else: - DUCC_HOME = os.environ['DUCC_HOME'] - -print 'Using', os.environ['DUCC_HOME'] -sys.path.append(DUCC_HOME + '/admin') +os.environ['DUCC_HOME'] = os.path.abspath('../..') +sys.path.append(os.environ['DUCC_HOME'] + '/admin') from ducc_util import DuccUtil from ducc_util import DuccProperties @@ -681,15 +674,6 @@ class RunDucc(DuccUtil): print ' --use_jar' print ' Indicate whether to use the executable jars for submit. Default:', self.use_jar print '' - print ' --use_apache_pkk true|false' - print ' Indicate whether to use org.apache.uima.ducc package for submit. Implies use_jar=false. Default:', self.use_apache_package - print '' - print ' --use_ibm_pkg true|false' - print ' Indicate whether to use deprecated com.ibm.ducc package for submit. Implies use_jar=false. Default:', self.use_ibm_package - print '' - print ' --use_jar true|false' - print ' Indicate whether to use the executable jars for submit. Default:', self.use_jar - print '' print ' -w, --watch' print ' Specifies that we submit in keepalive mode and watch the jobs, creating a dir with outputs. Default:', self.watch print ' If specified, we run verification against the results.' @@ -734,8 +718,7 @@ class RunDucc(DuccUtil): 'init_fail_cap=', 'range=', 'memory_override=', 'process_timeout=', 'watch', 'jd_uima_log=', 'jp_uima_log=', - 'use_jar', - 'use_apache_package', 'use_ibm_package', + 'use_jar' ]) for ( o, a ) in opts: @@ -848,7 +831,4 @@ class RunDucc(DuccUtil): # -------------------------------------------------------------------------------- if __name__ == "__main__": runducc = RunDucc() - runducc.set_classpath_for_cli() - #for c in os.environ['CLASSPATH'].split(':'): - # print c runducc.main(sys.argv[1:]) Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/service URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/service?rev=1500894&r1=1500893&r2=1500894&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/service (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/service Mon Jul 8 19:25:48 2013 @@ -35,22 +35,8 @@ import signal from threading import * import Queue -if ( not os.environ.has_key('DUCC_HOME') ): - me = os.path.abspath(sys.argv[0]) - - print "ME:", me - ndx = me.rindex('/') - ndx = me.rindex('/', 0, ndx) - ndx = me.rindex('/', 0, ndx) - ndx = me.rindex('/', 0, ndx) - DUCC_HOME=me[:ndx] + '/ducc_build/runtime' - os.environ['DUCC_HOME'] = DUCC_HOME - print 'Environment variable DUCC_HOME is missing, using default', DUCC_HOME -else: - DUCC_HOME = os.environ['DUCC_HOME'] - -print 'Using', os.environ['DUCC_HOME'] -sys.path.append(DUCC_HOME + '/admin') +os.environ['DUCC_HOME'] = os.path.abspath('../..') +sys.path.append(os.environ['DUCC_HOME'] + '/admin') from ducc_util import DuccUtil from ducc_util import DuccProperties @@ -83,6 +69,7 @@ class DuccService(DuccUtil): print 'broker:', self.broker_url + DUCC_HOME = os.environ['DUCC_HOME'] CMD = ['java'] CMD.append("-DSERVICE_ID=" + instance) CMD.append("-DdefaultBrokerURL='" + self.broker_url + "'") @@ -91,7 +78,7 @@ class DuccService(DuccUtil): CMD.append('org.apache.uima.ducc.test.service.UIMA_Service') CMD.append('-saxonURL file:' + DUCC_HOME + '/lib/saxon/saxon8.jar') CMD.append('-xslt ' + DUCC_HOME + '/resources/dd2spring.xsl') - CMD.append('-dd ' + DUCC_HOME + '/examples/simple/service/Service_FixedSleep_' + instance + '.xml') + CMD.append('-dd ' + DUCC_HOME + '/examples/simple/resources/service/Service_FixedSleep_' + instance + '.xml') #CMD.append('-b') os.environ['AE_INIT_TIME'] = '5' os.environ['AE_INIT_RANGE'] = '5' Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/start_sim URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/start_sim?rev=1500894&r1=1500893&r2=1500894&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/start_sim (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/scripts/start_sim Mon Jul 8 19:25:48 2013 @@ -32,11 +32,9 @@ import sys import time import getopt -if ( not os.environ.has_key('DUCC_HOME') ): - os.environ['DUCC_HOME'] = os.path.abspath('../..') - -DUCC_HOME=os.environ['DUCC_HOME'] -sys.path.append(DUCC_HOME + '/admin') +#designed to run only here, relative to ducc_runtime +os.environ['DUCC_HOME'] = os.path.abspath(sys.argv[0] + '/../../..') +sys.path.append(os.environ['DUCC_HOME'] + '/admin') from ducc_util import DuccUtil from ducc_util import DuccProperties @@ -188,8 +186,7 @@ class StartSim(DuccUtil): print 'Starting agent on', node, 'instance', index, 'as pseudo-node', pnode, 'IP', ip, 'memory', mem, here = os.getcwd() - me = os.path.abspath(sys.argv[0]) - cmd = 'export DUCC_HOME=' + self.DUCC_HOME + ';' + me + cmd = os.path.abspath(sys.argv[0]) lines = self.ssh(node, True, "'", cmd, '--agent', '--memory', mem, '--addr', ip, '--pseudoname', pnode, "'") while 1: line = lines.readline().strip()