Fix SNMP tests compilation issue on Windows
| | |
| | | |
| | | if aciValue: |
| | | aciValue=aciValue.replace('"','\\"') |
| | | if isWindows: |
| | | if is_windows_platform(mylocation): |
| | | aciValue=aciValue.replace(r'||',r'"||"') |
| | | |
| | | STAFCmdParamsList=[] |
| | |
| | | STAXResult |
| | | </return> |
| | | </sequence> |
| | | </function> |
| | | </function> |
| | | </stax> |
| | |
| | | </function-prolog> |
| | | |
| | | <sequence> |
| | | |
| | | <!-- Resolve any OS related variables --> |
| | | <call function="'getOSvariables'"> |
| | | { 'hostname' : STAF_REMOTE_HOSTNAME } |
| | | </call> |
| | | |
| | | <!-- fixMe: this needs some cleanup --> |
| | | <script> |
| | | STAXLogMessage = 1 |
| | | OPENDS_BINPATH ='%s/%s/bin' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME) |
| | | OSName= STAXResult |
| | | winPattern=re.compile('win', re.IGNORECASE) |
| | | isWindows=winPattern.search(OSName) |
| | | if isWindows: |
| | | OPENDS_BINPATH ='%s/%s/bin' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME) |
| | | if is_windows_platform(STAF_REMOTE_HOSTNAME): |
| | | fileExt='.bat' |
| | | fileFolder='bat' |
| | | pathSeparator=';' |
| | |
| | | snmpPath = '%s/%s/snmp' % (DIRECTORY_INSTANCE_DIR, relativeJavaDir) |
| | | cp = 'CLASSPATH=%s/%s:%s/jdmkrt.jar:.' % (DIRECTORY_INSTANCE_DIR,SNMP_OPENDS_JARFILE, snmpPath) |
| | | |
| | | if isWindows: |
| | | if is_windows_platform(location): |
| | | cp = cp.replace(':', ';') |
| | | |
| | | env = ['JAVA_HOME=%s' % JAVA_HOME, '%s' % cp] |
| | |
| | | snmpPath = '%s/%s/snmp' % (DIRECTORY_INSTANCE_DIR, relativeJavaDir) |
| | | cp = 'CLASSPATH=%s/%s:%s/jdmkrt.jar:.' % (DIRECTORY_INSTANCE_DIR,SNMP_OPENDS_JARFILE, snmpPath) |
| | | |
| | | if isWindows: |
| | | if is_windows_platform(location): |
| | | cp = cp.replace(':', ';') |
| | | |
| | | env = ['JAVA_HOME=%s' % JAVA_HOME, '%s' % cp] |
| | |
| | | cp = 'CLASSPATH=%s/%s:%s/jdmkrt.jar:%s:.' \ |
| | | % (DIRECTORY_INSTANCE_DIR,SNMP_OPENDS_JARFILE, snmpPath, jstaf_jarfile) |
| | | |
| | | if isWindows: |
| | | if is_windows_platform(location): |
| | | cp = cp.replace(':', ';') |
| | | |
| | | env = ['JAVA_HOME=%s' % JAVA_HOME, '%s' % cp] |
| | |
| | | </call> |
| | | |
| | | <!-- fixMe: Windows Services are not enabled --> |
| | | <if expr="isWindows"> |
| | | <if expr="is_windows_platform(dsHost)"> |
| | | <script> |
| | | enableWindowsService='' |
| | | </script> |
| | |
| | | _id = '%s#%d' % (strftime('%Y-%m-%d %H:%M:%S',localtime()),random.randint(0,999)) |
| | | |
| | | if not env: |
| | | if isWindows: |
| | | if is_windows_platform(location): |
| | | env=['PATH=C:\Windows;C:\Windows\system32;%s' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME] |
| | | else: |
| | | env=['PATH=/bin:/usr/bin:%s' % dsPath, 'JAVA_HOME=%s' % JAVA_HOME] |
| | |
| | | </call> |
| | | |
| | | <script> |
| | | if isWindows: |
| | | if is_windows_platform(location): |
| | | _cmd = 'tskill' |
| | | _args = STAXResult |
| | | else: |
| | |
| | | cp = 'CLASSPATH=%s:.' % classpath |
| | | else: |
| | | cp = 'CLASSPATH=.' |
| | | |
| | | if isWindows: |
| | | |
| | | if is_windows_platform(location): |
| | | cp = cp.replace(':', ';') |
| | | |
| | | |
| | | if location == STAXServiceMachine: |
| | | cmd = '%s/bin/javac' % local_java_home |
| | | env = ['%s' % cp] |
| | |
| | | cmd = '%s/bin/javac' % JAVA_HOME |
| | | env = ['JAVA_HOME=%s' % JAVA_HOME, '%s' % cp] |
| | | </script> |
| | | |
| | | |
| | | <call function="'listFolderByExtension'" > |
| | | { |
| | | 'location' : location , |
| | |
| | | # $Source$ |
| | | |
| | | # public symbols |
| | | __all__ = [ "format_testcase", "directory_server_information", "test_time", "report_generation", "compare_file", "exception_thrown" ] |
| | | __all__ = [ "format_testcase", |
| | | "directory_server_information", |
| | | "test_time", |
| | | "report_generation", |
| | | "compare_file", |
| | | "is_windows_platform", |
| | | "exception_thrown" ] |
| | | |
| | | class format_testcase: |
| | | 'Format the Test name objects' |
| | |
| | | return ret_str |
| | | finally: |
| | | diff_file.close() |
| | | |
| | | def is_windows_platform(host): |
| | | from java.lang import Boolean |
| | | from com.ibm.staf import STAFHandle |
| | | from com.ibm.staf import STAFResult |
| | | import re |
| | | |
| | | handle = STAFHandle("varHandle") |
| | | res = handle.submit2(host, "VAR", "GET SYSTEM VAR STAF/Config/OS/Name") |
| | | |
| | | winPattern=re.compile('win', re.IGNORECASE) |
| | | if (winPattern.search(res.result) != None): |
| | | return Boolean.TRUE |
| | | else: |
| | | return Boolean.FALSE |