From b7e6ddbc774e90cf71059050d8de7e652e6f0467 Mon Sep 17 00:00:00 2001
From: al_xipe <al_xipe@localhost>
Date: Tue, 24 Jul 2007 12:24:18 +0000
Subject: [PATCH] 1. allow to bypass proxy check in functional tests wrapper 2. add modify index test cases 3. add the rebuild-index CLI wrapper in utils.xml 4. add the ability in runFunction to set a test case status upon failure to reflect an exception being thrown or things like that

---
 opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml b/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml
index 3b26f61..117b202 100755
--- a/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml
+++ b/opendj-sdk/opends/tests/functional-tests/shared/functions/utils.xml
@@ -844,6 +844,33 @@
           True or False should be used for this argument.
         </function-arg-description>
       </function-arg-def>
+      
+      <function-arg-def name="functionFailureTC" type="optional">
+        <function-arg-description>
+          If this argument is provided, a testcase will be created with 
+          this argument's value for name and set to fail only upon failure
+        </function-arg-description>
+      </function-arg-def>
+      
+      <function-arg-def name="functionSignal" type="optional">
+        <function-arg-description>
+          If this argument is provided, a signal will be raised upon unsuccesful
+          execution of the function to run
+        </function-arg-description>
+      </function-arg-def>
+      
+      <function-arg-def name="functionCallBack" type="optional">
+        <function-arg-description>
+          If this argument is provided then functionCallBack will be called
+          after the execution of function name.
+        </function-arg-description>
+      </function-arg-def>
+      
+      <function-arg-def name="functionCallBackArguments" type="optional">
+        <function-arg-description>
+           This allows to specify arguments for the call back function
+        </function-arg-description>
+      </function-arg-def>
     </function-map-args>
     <sequence>
       <script>
@@ -870,6 +897,10 @@
         _doSetTCStatus=False
         if functionSetsTCStatus:
           _doSetTCStatus=True
+          
+        _createFailureTC=False
+        if functionFailureTC:
+          _createFailureTC=True
       </script>
       <message log="1" level="'info'" if="_displayMessage == True">'%s' % functionMessage</message>
       <message log="1" level="'debug'">'runFunction: %s: called with parameters [%s]' % (functionName,functionArguments)</message>
@@ -906,6 +937,20 @@
         </if>
       </if>
       
+      <!-- this section handles the optional case when we need to set a 
+           test case status to fail to reflect the failure in the test report.
+      -->
+      <if expr="_createFailureTC == True" >
+        <if expr="_functionRC != expectedRC" >
+          <testcase name="'!!! %s [%s]' % (functionFailureTC,functionName)">
+            <tcstatus result="'fail'" />
+          </testcase>
+        </if>
+      </if>
+      
+      <!-- TODO: implement the signal raising mechanism -->
+      <!-- TODO: implement the call back function mechanism -->
+      
       <!-- bubble the function return code up one level -->
       <return>_functionRC</return>
     </sequence>

--
Gitblit v1.10.0