mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

gary_williams
27.51.2007 8456ef6a9793dee92e36a7ca7a8aa5866d798f5b
Issue 1222 path and name of to config.py should be parameterized
1 files modified
22 ■■■■ changed files
opendj-sdk/opends/tests/functional-tests/testcases/runTestJob.xml 22 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/functional-tests/testcases/runTestJob.xml
@@ -29,14 +29,29 @@
<stax>
  <defaultcall function="start_job"/>
  <function name="start_job">
    <function-single-arg>
      <function-optional-arg name="config" default="''"/>
    </function-single-arg>
    <sequence>
      <script>
        STAXLogMessage = 1
      </script>
      <script>
        if config:
          import os, sys
          myconfigpath,myconfigfile=os.path.split(config)
          sys.path.append("%s" % myconfigpath )
          from config import *
        else:
          myconfigpath='%s/config' % TESTS_DIR
          myconfigfile='config.py'
      </script>
      <job name="'Job: %s %s' % (STAF_REMOTE_HOSTNAME,TEST_OS_STRING) " monitor="1" clearlogs="'Enabled'" logtcstartstop="'Enabled'">
        <job-file>'%s/testcases/runFuncTests.xml' % TESTS_DIR</job-file>
        <job-scriptfiles machine="STAF_LOCAL_HOSTNAME">['%s/config/config.py' % TESTS_DIR ]</job-scriptfiles>
        <job-scriptfiles machine="STAF_LOCAL_HOSTNAME">['%s/%s' % (myconfigpath,myconfigfile) ]</job-scriptfiles>
        <job-action>
          <log>'Started sub-job %s on %s' % (STAXSubJobID,STAF_REMOTE_HOSTNAME)</log>
        </job-action>
@@ -457,7 +472,7 @@
        transformer.transform(source, result)
        
        #the new report transformation
        TransformerFactory.newInstance().newTemplates(StreamSource(FileInputStream("%s/xsl/my-report.xsl" % TESTS_SHARED_DIR))).newTransformer().transform(StreamSource(FileInputStream("%s/tests-log.xml" % TMPDIR)), StreamResult(FileOutputStream("%s/my-report.html" % TMPDIR)))
        TransformerFactory.newInstance().newTemplates(StreamSource(FileInputStream("%s/xsl/my-report.xsl" % TESTS_SHARED_DIR))).newTransformer().transform(StreamSource(FileInputStream("%s/tests-log.xml" % TMPDIR)), StreamResult(FileOutputStream("%s/my-report.html" % TMPDIR)))
      </script>
      
      <if expr="SEND_MAIL_AFTER_TEST_RUN == 'TRUE'">
@@ -506,5 +521,6 @@
        }
      </call>
    </sequence>
  </function>
</stax>