1 21 22 package org.apache.derbyTesting.functionTests.harness; 23 24 import java.util.Enumeration ; 25 import java.util.Properties ; 26 import java.util.StringTokenizer ; 27 28 35 36 public class SpecialFlags 37 { 38 39 public static Properties getSpecialProperties(Properties suiteProperties) 40 { 41 44 String [] excludeList = new String [32]; 48 excludeList[0] = "jvm"; 49 excludeList[1] = "classpath"; 50 excludeList[2] = "classpathServer"; 51 excludeList[3] = "framework"; 52 excludeList[4] = "usesystem"; 53 excludeList[5] = "useprocess"; 54 excludeList[6] = "outputdir"; 55 excludeList[7] = "replication"; 56 excludeList[8] = "keepfiles"; 57 excludeList[9] = "mtestdir"; 58 excludeList[10] = "suites"; 59 excludeList[11] = "searchCP"; 60 excludeList[12] = "useoutput"; 61 excludeList[13] = "suitename"; 62 excludeList[14] = "cleanfiles"; 63 excludeList[15] = "systemdiff"; 64 excludeList[16] = "jvmflags"; 65 excludeList[17] = "testJavaFlags"; 66 excludeList[18] = "ij.defaultResourcePackage"; 67 excludeList[19] = "outcopy"; 68 excludeList[20] = "verbose"; 69 excludeList[21] = "canondir"; 70 excludeList[22] = "timeout"; 71 excludeList[23] = "encryption"; 72 excludeList[24] = "javaCmd"; 73 excludeList[25] = "topreportdir"; 74 excludeList[26] = "jarfile"; 75 excludeList[27] = "upgradetest"; 76 excludeList[28] = "jdk12test"; 77 excludeList[29] = "jdk12exttest"; 78 excludeList[30] = "skipsed"; 79 excludeList[31] = "sourceEnv"; 80 81 Properties p = new Properties (); 82 83 for (Enumeration e = suiteProperties.propertyNames(); e.hasMoreElements();) 84 { 85 boolean exclude = false; 86 String key = (String )e.nextElement(); 87 for ( int i = 0; i < excludeList.length; i++ ) 88 { 89 if ( excludeList[i].equals(key) ) 90 { 91 exclude = true; 92 break; 93 } 94 } 95 if ( exclude == false ) 96 { 97 String value = suiteProperties.getProperty(key); 98 p.put(key,value); 99 } 100 } 101 return p; 102 } 103 104 public static void parse(String flags, 105 Properties ijProps, Properties srvProps) 106 { 107 if (flags == null) 110 flags = ""; 111 StringTokenizer st = new StringTokenizer (flags, "^"); 112 String str = ""; 113 String key = ""; 114 String value = ""; 115 while (st.hasMoreTokens()) 116 { 117 str = st.nextToken(); 118 key = str.substring( 0, str.indexOf("=") ); 120 value = str.substring( (str.indexOf("=") + 1) ); 121 if ( str.startsWith("derby") ) 122 { 123 if ( key.equals("derby.debug.true") || 126 key.equals("derby.infolog.streams") ) 127 { 128 String currval = srvProps.getProperty(key); 129 if ( (currval != null) && (currval.length()>0) ) 130 { 131 value = value + "," + currval; 132 } 133 } 134 srvProps.put(key,value); 135 } 136 else 137 ijProps.put(key,value); 139 } 140 } 141 142 private SpecialFlags(){} 144 } 145 | Popular Tags |