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

gary_williams
26.24.2007 cd2efd6ad6f7e91558abe7d7393515507333bad3
Fix Issue 1399 align tests to use bat folder on windows
3 files modified
121 ■■■■ changed files
opends/tests/functional-tests/shared/functions/dsadm.xml 66 ●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/functions/ldap.xml 47 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/runFuncTests.xml 8 ●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/functions/dsadm.xml
@@ -91,7 +91,8 @@
        STAFCmdParams=''
        if dsPath:
          STAFCmd='%s/bin/configure-ds%s' % (dsPath,fileExt)
          dsBinPath='%s/%s' % (dsPath,fileFolder)
          STAFCmd='%s/configure-ds%s' % (dsBinPath,fileExt)
                  
        if dsPort:
          STAFCmdParamsList.append('-p %s' % dsPort)
@@ -122,9 +123,9 @@
        <location>'%s' % location</location>
        <command>'%s' % STAFCmd</command>
        <parms>'%s' % STAFCmdParams</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <console use="'same'"/>
        <stderr mode="'stdout'"/>
@@ -189,7 +190,8 @@
        STAFCmdParams=''
        if dsPath:
          STAFCmd='%s/bin/start-ds%s' % (dsPath,fileExt)
          dsBinPath='%s/%s' % (dsPath,fileFolder)
          STAFCmd='%s/start-ds%s' % (dsBinPath,fileExt)
                  
        if dsVersion:
          STAFCmdParamsList.append('-v')
@@ -214,9 +216,9 @@
        <location>'%s' % location</location>
        <command>'%s' % STAFCmd</command>
        <parms>'%s' % STAFCmdParams</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <console use="'same'"/>
        <stderr mode="'stdout'"/>
@@ -380,7 +382,8 @@
        STAFCmdParams=''
        if dsPath:
          STAFCmd='%s/bin/stop-ds%s' % (dsPath,fileExt)
          dsBinPath='%s/%s' % (dsPath,fileFolder)
          STAFCmd='%s/stop-ds%s' % (dsBinPath,fileExt)
                  
        if dsHost:
          STAFCmdParamsList.append('-h %s' % dsHost)
@@ -453,9 +456,9 @@
        <location>'%s' % (location)</location>
        <command>'%s' % (STAFCmd)</command>
        <parms>'%s' % (STAFCmdParams)</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <stderr mode="'stdout'"/>
        <returnstdout/>
@@ -600,15 +603,15 @@
    
    <sequence>
      <message>
        'import-ldif%s -l %s -n %s %s' % (fileExt,ldifFile,backEnd,extraParams)
        '%s/import-ldif%s -l %s -n %s %s' % (dsBinPath,fileExt,ldifFile,backEnd,extraParams)
      </message>
      <process name="'Offline Import'">
        <location>'%s' % location </location>
        <command>'%s/bin/import-ldif%s' % (dsPath,fileExt)</command>
        <command>'%s/import-ldif%s' % (dsBinPath,fileExt)</command>
        <parms>'-l %s -n %s %s' % (ldifFile,backEnd,extraParams)</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <stderr mode="'stdout'"/>
        <returnstdout/>
@@ -773,7 +776,8 @@
        STAFCmdParams=''
        if dsPath:
          STAFCmd='%s/bin/import-ldif%s' % (dsPath,fileExt)
          dsBinPath='%s/%s' % (dsPath,fileFolder)
          STAFCmd='%s/import-ldif%s' % (dsBinPath,fileExt)
        if dsLdifFile:
          STAFCmdParamsList.append('-l %s' % dsLdifFile)
@@ -843,9 +847,9 @@
        <location>'%s' % location</location>
        <command>'%s' % STAFCmd</command>
        <parms>'%s' % STAFCmdParams</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>         
        <stderr mode="'stdout'"/>
        <returnstdout/>
@@ -1315,11 +1319,11 @@
      </message>
      <process name="'Ldif Export'">
        <location>'%s' % location </location>
        <command>'%s/bin/export-ldif%s' % (dsPath,fileExt)</command>
        <command>'%s/export-ldif%s' % (dsBinPath,fileExt)</command>
        <parms>'-l %s -n %s %s' % (ldifFile,backEnd,extraParams)</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <stderr mode="'stdout'"/>
        <returnstdout/>
@@ -1597,11 +1601,11 @@
      </message>
      <process name="'Offline Backup'">
        <location>'%s' % mylocation </location>
        <command>'%s/bin/backup%s' % (dsPath,fileExt)</command>
        <command>'%s/backup%s' % (dsBinPath,fileExt)</command>
        <parms>'-d %s -n %s %s' % (backupDir,backEnd,extraParams)</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
              ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
              ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <stderr mode="'stdout'"/>
        <returnstdout/>
@@ -1842,11 +1846,11 @@
      </message>
      <process name="'Offline restore'">
        <location>'%s' % mylocation </location>
        <command>'%s/bin/restore%s' % (dsPath,fileExt)</command>
        <command>'%s/restore%s' % (dsBinPath,fileExt)</command>
        <parms>'-d %s %s' % (backupDir,extraParams)</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <stderr mode="'stdout'"/>
        <returnstdout/>
@@ -2201,7 +2205,8 @@
        STAFCmdParams=''
        if dsPath:
          STAFCmd='%s/bin/ldapmodify%s' % (dsPath,fileExt)
          dsBinPath='%s/%s' % (dsPath,fileFolder)
          STAFCmd='%s/ldapmodify%s' % (dsBinPath,fileExt)
        STAFCmdParamsList.append('-a')
@@ -2229,9 +2234,9 @@
        <location>'%s' % mylocation</location>
        <command>'%s' % STAFCmd</command>
        <parms>'%s' % STAFCmdParams</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <stdin>'%s' % dsTaskLdif</stdin>
        <stderr mode="'stdout'"/>
@@ -2308,7 +2313,8 @@
        STAFCmdParams=''
        if dsPath:
          STAFCmd='%s/bin/ldapsearch%s' % (dsPath,fileExt)
          dsBinPath='%s/%s' % (dsPath,fileFolder)
          STAFCmd='%s/ldapsearch%s' % (dsBinPath,fileExt)
        if dsHost:
          STAFCmdParamsList.append('-h %s' % dsHost)
@@ -2355,9 +2361,9 @@
            <location>'%s' % mylocation</location>
            <command>'%s' % STAFCmd</command>
            <parms>'%s' % STAFCmdParams</parms>
            <workdir>'%s/bin' % dsPath</workdir>
            <workdir>'%s' % dsBinPath</workdir>
            <envs>
              ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
              ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
            </envs>
            <stderr mode="'stdout'"/>
            <returnstdout/>
opends/tests/functional-tests/shared/functions/ldap.xml
@@ -93,7 +93,8 @@
        STAFCmdParams=''
        if dsPath:
          STAFCmd='%s/bin/ldapmodify%s' % (dsPath,fileExt)
          dsBinPath='%s/%s' % (dsPath,fileFolder)
          STAFCmd='%s/ldapmodify%s' % (dsBinPath,fileExt)
          
        STAFCmdParamsList.append('-a')
      </script>
@@ -119,9 +120,9 @@
        <location>'%s' % mylocation</location>
        <command>'%s' % STAFCmd</command>
        <parms>'%s' % STAFCmdParams</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <console use="'same'"/>
        <stderr mode="'stdout'"/>
@@ -204,7 +205,8 @@
        STAFCmdParams=''
        if dsPath:
          STAFCmd='%s/bin/ldapmodify%s' % (dsPath,fileExt)
          dsBinPath='%s/%s' % (dsPath,fileFolder)
          STAFCmd='%s/ldapmodify%s' % (dsBinPath,fileExt)
      </script>
@@ -229,9 +231,9 @@
        <location>'%s' % location</location>
        <command>'%s' % STAFCmd</command>
        <parms>'%s' % STAFCmdParams</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <console use="'same'"/>
        <stderr mode="'stdout'"/>
@@ -332,7 +334,8 @@
        STAFCmdParams=''
        if dsPath:
          STAFCmd='%s/bin/ldapsearch%s' % (dsPath,fileExt)
          dsBinPath='%s/%s' % (dsPath,fileFolder)
          STAFCmd='%s/ldapsearch%s' % (dsBinPath,fileExt)
      </script>
@@ -366,9 +369,9 @@
        <location>'%s' % location</location>
        <command>'%s' % STAFCmd</command>
        <parms>'%s' % STAFCmdParams</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <console use="'same'"/>
        <stderr mode="'stdout'"/>
@@ -451,11 +454,11 @@
      </message>
      <process name="'Search Base Object No Password'">
        <location>'%s' % location </location>
        <command>'%s/bin/ldapsearch%s' % (dsPath,fileExt)</command>
        <command>'%s/ldapsearch%s' % (dsBinPath,fileExt)</command>
        <parms>'-h %s -p %s -D "%s" %s -b "%s" "%s"' % (dsInstanceHost,dsInstancePort,dsInstanceDn,extraParams,dsBaseDN,dsFilter)</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <stderr mode="'stdout'"/>
        <returnstdout/>
@@ -517,11 +520,11 @@
      </message>
      <process name="'Anonymous Search Base Object'">
        <location>'%s' % location </location>
        <command>'%s/bin/ldapsearch%s' % (dsPath,fileExt)</command>
        <command>'%s/ldapsearch%s' % (dsBinPath,fileExt)</command>
        <parms>'-h %s -p %s %s -b "%s" "%s"' % (dsInstanceHost,dsInstancePort,extraParams,dsBaseDN,dsFilter)</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <stderr mode="'stdout'"/>
        <returnstdout/>
@@ -597,7 +600,8 @@
        STAFCmdParams=''
        if dsPath:
          STAFCmd='%s/bin/ldapdelete%s' % (dsPath,fileExt)
          dsBinPath='%s/%s' % (dsPath,fileFolder)
          STAFCmd='%s/ldapdelete%s' % (dsBinPath,fileExt)
          
      </script>
@@ -622,9 +626,9 @@
        <location>'%s' % location</location>
        <command>'%s' % STAFCmd</command>
        <parms>'%s' % STAFCmdParams</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <console use="'same'"/>
        <stderr mode="'stdout'"/>
@@ -713,7 +717,8 @@
        STAFCmdParams=''
        if dsPath:
          STAFCmd='%s/bin/ldapcompare%s' % (dsPath,fileExt)
          dsBinPath='%s/%s' % (dsPath,fileFolder)
          STAFCmd='%s/ldapcompare%s' % (dsBinPath,fileExt)
          
      </script>
@@ -740,9 +745,9 @@
        <location>'%s' % location</location>
        <command>'%s' % STAFCmd</command>
        <parms>'%s' % STAFCmdParams</parms>
        <workdir>'%s/bin' % dsPath</workdir>
        <workdir>'%s' % dsBinPath</workdir>
        <envs>
          ['PATH=/bin:/usr/bin:%s/bin' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME]
          ['PATH=/bin:/usr/bin:%s' % dsBinPath, 'JAVA_HOME=%s' % JAVA_HOME]
        </envs>
        <console use="'same'"/>
        <stderr mode="'stdout'"/>
opends/tests/functional-tests/testcases/runFuncTests.xml
@@ -80,15 +80,17 @@
        STAXLogMessage = 1 
        LogDir='%s' % TMPDIR
        SRCFILE = '%s/%s' % (ZIPPATH,ZIPNAME) 
        DSTFILE = '%s/%s' % (TMPDIR,ZIPNAME)
        OPENDS_BINPATH = '%s/%s/bin' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)
        DSTFILE = '%s/%s' % (TMPDIR,ZIPNAME)
        OPENDS_BINPATH ='%s/%s/bin' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)
        OSName= STAXResult
        winPattern=re.compile('win', re.IGNORECASE)
        isWindows=winPattern.search(OSName)
        if isWindows:
          fileExt='.bat'
          fileFolder='bat'
        else:
          fileExt=''
          fileFolder='bin'
      </script>
      
      <!-- Load in the local shared python objects from libraries -->
@@ -135,8 +137,6 @@
      <call function="'main_schema'" />
        
      <if expr="not isWindows">
      <!-- Do not execute Synchronization Test Suite as long as dynamic configuration
          is not supported. ('dd' not supported in Windows.  see 'configureSynchronization' -->
      <sequence>        
      <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
        file="'%s/testcases/synchronization/synchronization.xml' % (TESTS_DIR)" />