| | |
| | | <script> |
| | | logFile = STAXResult[0] |
| | | fileFd = open(logFile,'w') |
| | | |
| | | params = client.getParams() |
| | | paramsList = '' |
| | | for p in params: |
| | | paramsList = '%s%s:%s ' % (paramsList,p[0],p[1]) |
| | | </script> |
| | | <!-- == Write tag for xml report --> |
| | | <call function="'writeStartTagClient'"> |
| | | { |
| | | 'client' : client, |
| | | 'extraParameters' : 'params=\"%s\"' % paramsList, |
| | | 'fileFd' : fileFd |
| | | } |
| | | </call> |
| | |
| | | str = '%s, max duration is %s sec' % (str, duration) |
| | | </script> |
| | | <message> str </message> |
| | | <call function="'writeMessage'"> |
| | | <!--<call function="'writeMessage'"> |
| | | { 'fileFd' : fileFd, |
| | | 'content' : 'Client id %s' % client.getId() |
| | | } |
| | | </call> |
| | | </call>--> |
| | | </sequence> |
| | | <else> |
| | | <sequence> |
| | |
| | | str = '%s, max duration is %s sec' % (str, duration) |
| | | </script> |
| | | <message> str </message> |
| | | <call function="'writeMessage'"> |
| | | <!--<call function="'writeMessage'"> |
| | | { 'fileFd' : fileFd, |
| | | 'content' : str |
| | | } |
| | | </call> |
| | | </call>--> |
| | | </sequence> |
| | | </else> |
| | | </if> |
| | |
| | | </script> |
| | | <if expr="fileExist == TRUE"> |
| | | <sequence> |
| | | <call function="'writeStartTagOperation'"> |
| | | { 'tagName' : 'clientPreamble', |
| | | 'fileFd' : fileFd } |
| | | </call> |
| | | <script> |
| | | errNum = 0 |
| | | errMsg = '' |
| | | </script> |
| | | <!--============= Start the client under a timer =================--> |
| | | <!--== open logfile for details ==--> |
| | |
| | | <!--=============== Log info =====================================--> |
| | | <call function="'writeMessage'"> |
| | | { |
| | | 'content' : 'Client preamble : %s' % logFileDetails, |
| | | 'content' : 'Client preamble', |
| | | 'xlink' : logFileDetailsRelativePath, |
| | | 'fileFd' : fileFd |
| | | } |
| | |
| | | ' Stop pretamble for %s (id=%s) running on %s' % \ |
| | | (client.getName(),client.getId(), client.getHost()) |
| | | </message> |
| | | <call function="'checkRC'"> |
| | | { |
| | | 'returncode' : errNum, |
| | | 'result' : errMsg, |
| | | 'fileFd' : fileFd |
| | | } |
| | | </call> |
| | | <call function="'writeEndTagOperation'">{'fileFd' : fileFd}</call> |
| | | </sequence> |
| | | <else> |
| | | <message> |
| | |
| | | </script> |
| | | <if expr="fileExist == TRUE"> |
| | | <sequence> |
| | | <call function="'writeStartTagOperation'"> |
| | | { 'tagName' : 'clientPostamble', |
| | | 'fileFd' : fileFd } |
| | | </call> |
| | | <script> |
| | | errNum = 0 |
| | | errMsg = '' |
| | | </script> |
| | | <!--============= Start the client under a timer =================--> |
| | | <!--== open logfile for details ==--> |
| | |
| | | <!--=============== Log info =====================================--> |
| | | <call function="'writeMessage'"> |
| | | { |
| | | 'content' : 'Client postamble : %s' % logFileDetails, |
| | | 'content' : 'Client postamble', |
| | | 'xlink' : logFileDetailsRelativePath, |
| | | 'fileFd' : fileFd |
| | | } |
| | |
| | | ' Stop postamble for %s (id=%s) running on %s' % \ |
| | | (client.getName(),client.getId(), client.getHost()) |
| | | </message> |
| | | <call function="'checkRC'"> |
| | | { |
| | | 'returncode' : errNum, |
| | | 'result' : errMsg, |
| | | 'fileFd' : fileFd |
| | | } |
| | | </call> |
| | | <call function="'writeEndTagOperation'">{'fileFd' : fileFd}</call> |
| | | </sequence> |
| | | <else> |
| | | <message> |
| | |
| | | </function-map-args> |
| | | |
| | | <sequence> |
| | | <call function="'writeStartTagOperation'"> |
| | | { 'tagName' : 'clientRun', |
| | | 'fileFd' : fileFd } |
| | | </call> |
| | | <script> |
| | | errNum = 0 |
| | | errMsg = '' |
| | | </script> |
| | | <!--=============== Start the client under a timer =================--> |
| | | <!--== open logfile for details ==--> |
| | |
| | | timerKilled = STAXResult[1] |
| | | </script> |
| | | |
| | | <!--=============== Log info =======================================--> |
| | | <call function="'writeMessage'"> |
| | | { |
| | | 'content' : 'Details of the client', |
| | | 'xlink' : logFileDetailsRelativePath, |
| | | 'fileFd' : fileFd |
| | | } |
| | | </call> |
| | | <call function="'writeMessage'"> |
| | | { |
| | | 'content' : 'Client outPuts', |
| | | 'xlink' : outFile, |
| | | 'fileFd' : fileFd |
| | | } |
| | | </call> |
| | | |
| | | <!--=============== Analyze client run status ======================--> |
| | | <if expr="timerKilled == TRUE"> |
| | | <sequence> |
| | |
| | | </call> |
| | | <message> errMsg </message> |
| | | <script> |
| | | ERR_NUM[0] += 1 |
| | | errNum += 1 |
| | | </script> |
| | | </sequence> |
| | | <else> |
| | | <message> |
| | | ' Stop run for %s (id=%s) running on %s' % \ |
| | | (client.getName(),client.getId(), client.getHost()) |
| | | </message> |
| | | </else> |
| | | </if> |
| | | |
| | | <script> |
| | | finishedClients.append(client.getId()) |
| | | </script> |
| | | <call function="'checkRC'"> |
| | | { |
| | | 'returncode' : errNum, |
| | | 'result' : errMsg, |
| | | 'fileFd' : fileFd |
| | | } |
| | | </call> |
| | | <call function="'writeEndTagOperation'">{'fileFd' : fileFd}</call> |
| | | |
| | | <!--=============== Log info =======================================--> |
| | | <call function="'writeMessage'"> |
| | | { |
| | | 'content' : 'Details of the client : %s' % logFileDetails, |
| | | 'xlink' : logFileDetailsRelativePath, |
| | | 'fileFd' : fileFd |
| | | } |
| | | </call> |
| | | <call function="'writeMessage'"> |
| | | { |
| | | 'content' : 'Client outPuts : %s' % outFile, |
| | | 'xlink' : outFile, |
| | | 'fileFd' : fileFd |
| | | } |
| | | </call> |
| | | <message> |
| | | ' Stop run for %s (id=%s) running on %s' % \ |
| | | (client.getName(),client.getId(), client.getHost()) |
| | | </message> |
| | | <return> [ errNum , outFile ]</return> |
| | | </sequence> |
| | | </function> |