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

andrug
28.18.2008 b66a349023fb751e2ccb3c94d15e748087c79d5d
check configuration files before running the test
2 files modified
57 ■■■■■ changed files
opends/tests/system-tests/phases/main_run.xml 18 ●●●● patch | view | raw | blame | history
opends/tests/system-tests/phases/main_run_lib.xml 39 ●●●●● patch | view | raw | blame | history
opends/tests/system-tests/phases/main_run.xml
@@ -88,6 +88,7 @@
        ERR_NUM_TOTAL         = 0
      </script>
      
      <!-- ============ LOAD LIB ===================================== -->
      <!-- Load in any standard python libraries -->
      <script>
@@ -112,10 +113,23 @@
        file="'%s/../functional-run/staf/services/stax/libraries/STAXUtil.xml'
               % (TESTS_DIR)"/>
      
      <!-- ============ CREATE LOG STUFF ============================= -->
      <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
        file="'%s/phases/log/log.xml' % (TESTS_DIR)"/>
      <!-- ============ CONF FILES CHECK ============================= -->
      <!-- Check that configuration files have no NEED_VALUE strin     -->
      <script>ERR_NUM[0] = 0</script>
      <call function="'checkConfigurationFiles'"/>
      <if expr="ERR_NUM[0] != 0">
        <return/>
      <else>
        <script>ERR_NUM[0] = 0</script>
      </else>
      </if>
      <!-- ============ CREATE LOG STUFF ============================= -->
      <script>
        logsDate        = strftime("%Y%m%d-%H%M%S",localtime())
        LOG_DIR         = '%s/%s' % (TMPDIR,logsDate)
opends/tests/system-tests/phases/main_run_lib.xml
@@ -27,7 +27,44 @@
 ! -->
<stax>
  <!-- ************************************************************ -->
  <function name="checkConfigurationFiles">
  <function-no-args/>
  <sequence>
    <if expr="OPENDSDIR == 'NEED_VALUE'">
      <sequence>
        <message>'ERROR config.py : OPENDSDIR variable not defined'</message>
        <script> ERR_NUM[0] += 1 </script>
      </sequence>
    <else>
      <sequence>
        <call function="'grep'">
        {
          'location'      : STAXServiceMachine,
          'string2grep'   : 'NEED_VALUE',
          'expect2Find'   : FALSE,
          'caseSensitive' : FALSE,
          'file'          : '%s/config.py' % TESTS_DIR,
          'fileFd'        : NO_FILE
        }
        </call>
        <call function="'grep'">
        {
          'location'      : STAXServiceMachine,
          'string2grep'   : 'NEED_VALUE',
          'expect2Find'   : FALSE,
          'caseSensitive' : FALSE,
          'file'          : CONF_FILE,
          'fileFd'        : NO_FILE
        }
        </call>
      </sequence>
    </else>
    </if>
  </sequence>
  </function>
  <!-- ************************************************************ -->
  <function name="mainPreamble">
   <function-prolog>