From 9a26938a43a9f0d00cdf82f56841a0d9d13b5d91 Mon Sep 17 00:00:00 2001
From: madiot <madiot@localhost>
Date: Wed, 30 Sep 2009 12:34:10 +0000
Subject: [PATCH] fixing DSML issue tracking and tomcat logs backup

---
 opends/tests/staf-tests/shared/dsml/src/com/ibm/staf/service/opends/DSMLService.java |    4 +
 opends/tests/staf-tests/functional-tests/testcases/dsml/dsml_cleanup.xml             |    2 
 opends/tests/staf-tests/functional-tests/testcases/dsml/dsml_test.xml                |   59 ++++++++++++++++++-----------
 3 files changed, 40 insertions(+), 25 deletions(-)

diff --git a/opends/tests/staf-tests/functional-tests/testcases/dsml/dsml_cleanup.xml b/opends/tests/staf-tests/functional-tests/testcases/dsml/dsml_cleanup.xml
index 1c69881..0f50fe1 100755
--- a/opends/tests/staf-tests/functional-tests/testcases/dsml/dsml_cleanup.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/dsml/dsml_cleanup.xml
@@ -120,7 +120,7 @@
                 'location'  :  STAF_REMOTE_HOSTNAME,
                 'service'   :  'FS',
                 'request'   :  'COPY ',
-                'arguments' :  'DIRECTORY %s/%s-%s/logs TODIRECTORY %s/tomcatLogBackup TOMACHINE %s RECURSE' % (WC_DIRECTORY, WC_TYPE, WC_VERSION, STAXServiceMachine, local.temp)
+                'arguments' :  'DIRECTORY %s/%s-%s/logs TODIRECTORY %s/tomcatLogBackup TOMACHINE %s RECURSE' % (WC_DIRECTORY, WC_TYPE, WC_VERSION, local.temp, STAXServiceMachine)
               }
             </call>
 
diff --git a/opends/tests/staf-tests/functional-tests/testcases/dsml/dsml_test.xml b/opends/tests/staf-tests/functional-tests/testcases/dsml/dsml_test.xml
index 691a672..fbd1c90 100755
--- a/opends/tests/staf-tests/functional-tests/testcases/dsml/dsml_test.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/dsml/dsml_test.xml
@@ -280,10 +280,10 @@
                                 }
                               </call>
                               <if expr="RC != 0">
-                                <!-- list the known issue for the TC -->
                               <sequence>
-
-
+                                <script>
+                                  foundKnownIssue = False
+                                </script>
                                 <message>"check against test's known issues"</message>
 
                                 <call function="'runSTAFCommand'">
@@ -332,13 +332,16 @@
                                                   <call function="'setKnownIssue'">
                                                     { 'issueId' : issue }
                                                   </call>
+                                                  <script>
+                                                    foundKnownIssue = True
+                                                  </script>
                                                   <break/>
                                                 </sequence>
                                               </if>
                                             </sequence>
                                           </iterate>
                                         </if>
-                                        <if expr="len(genericIssues) > 0">
+                                        <if expr="not foundKnownIssue and len(genericIssues) > 0">
                                           <iterate var="issueFile" in="genericIssues">
                                             <sequence>
                                               <script>
@@ -361,33 +364,43 @@
                                                   <call function="'setKnownIssue'">
                                                     { 'issueId' : issue }
                                                   </call>
+                                                  <script>
+                                                    foundKnownIssue = True
+                                                  </script>
                                                   <break/>
                                                 </sequence>
                                               </if>
                                             </sequence>
                                           </iterate>
                                         </if>
-                                        <message>'checking string marker issues in result'</message>
-                                        <call function="'runSTAFCommand'">
-                                          { 'name'      :  'check if known issue %s' % issue,
-                                            'location'  :  STAXServiceMachine,
-                                            'service'   :  'DSML',
-                                            'request'   :  'CHECK_ERROR_STRINGS',
-                                            'arguments' :  'FILE %s ' %(runFilePath)
-
-                                          }
-                                        </call>
-                                        <if expr="RC >= 100000000">
-                                          <!-- string marked issues start from 100000000 -->
+                                        <if expr="not foundKnownIssue">
                                           <sequence>
-                                            <script>
-                                              issue = RC - 100000000
-                                            </script>
-                                            <!-- this is a known issue -->
-                                            <call function="'setKnownIssue'">
-                                              { 'issueId' : issue }
+                                            <message>'checking string marker issues in result'</message>
+                                            <call function="'runSTAFCommand'">
+                                              { 'name'      :  'check if known issue %s' % issue,
+                                                'location'  :  STAXServiceMachine,
+                                                'service'   :  'DSML',
+                                                'request'   :  'CHECK_ERROR_STRINGS',
+                                                'arguments' :  'FILE %s ' %(runFilePath)
+
+                                              }
                                             </call>
-                                            <break/>
+                                            <if expr="RC >= 100000000">
+                                              <!-- string marked issues start from 100000000 -->
+                                              <sequence>
+                                                <script>
+                                                  issue = RC - 100000000
+                                                </script>
+                                                <!-- this is a known issue -->
+                                                <call function="'setKnownIssue'">
+                                                  { 'issueId' : issue }
+                                                </call>
+                                                <script>
+                                                  foundKnownIssue=True
+                                                </script>
+                                                <break/>
+                                              </sequence>
+                                            </if>
                                           </sequence>
                                         </if>
 
diff --git a/opends/tests/staf-tests/shared/dsml/src/com/ibm/staf/service/opends/DSMLService.java b/opends/tests/staf-tests/shared/dsml/src/com/ibm/staf/service/opends/DSMLService.java
index 2033bdf..739bb58 100644
--- a/opends/tests/staf-tests/shared/dsml/src/com/ibm/staf/service/opends/DSMLService.java
+++ b/opends/tests/staf-tests/shared/dsml/src/com/ibm/staf/service/opends/DSMLService.java
@@ -156,7 +156,9 @@
   }
 
   private STAFResult handleCheckErrorStrings(STAFServiceInterfaceLevel30.RequestInfo info) {
-    STAFResult sr = new STAFResult(0);
+    // default return will be kDSMLInvalidSomething + 14 marking that
+    // no known error string match the erroneous expected file content.
+    STAFResult sr = new STAFResult(kDSMLInvalidSomething + 14);
     STAFCommandParseResult parsedRequest = fParser.parse(info.request);
     if (parsedRequest.rc != STAFResult.Ok) {
       return new STAFResult(STAFResult.InvalidRequestString,

--
Gitblit v1.10.0