Lines Matching refs:String

61     private static String JAVASRC_FOLDER = "";
62 private static String MAIN_SRC_OUTPUT_FOLDER = "";
66 private static String HOSTJUNIT_SRC_OUTPUT_FOLDER = "";
67 private static String OUTPUT_FOLDER = "";
68 private static String COMPILED_CLASSES_FOLDER = "";
70 private static String CLASSES_OUTPUT_FOLDER = "";
71 private static String HOSTJUNIT_CLASSES_OUTPUT_FOLDER = "";
73 private static String CLASS_PATH = "";
75 private static String restrictTo = null; // e.g. restrict to "opcodes.add_double"
77 private static final String TARGET_JAR_ROOT_PATH = "/data/local/tmp/vm-tests";
90 private LinkedHashMap<String, List<String>> map = new LinkedHashMap<String,
91 List<String>>();
94 String methodBody, constraint, title;
103 public static void main(String[] args) throws IOException { in main()
115 public static void parseArgs(String[] args) { in parseArgs()
173 String packageName = test.getClass().getPackage().getName();
177 String method = test.getName(); // e.g. testVFE2
178 String fqcn = test.getClass().getName(); // e.g.
185 List<String> li = map.get(fqcn);
188 li = new ArrayList<String>();
193 private String curJunitFileName = null;
194 private String curJunitName = null;
195 private String curJunitFileData = "";
202 String absPath = toWrite.getAbsolutePath();
214 private void openCTSHostFileFor(String pName, String classOnlyName) {
217 String sourceName = "JUnit_" + classOnlyName;
235 private String getShellExecJavaLine(String classpath, String mainclass) {
236 String cmd = String.format("ANDROID_DATA=%s dalvikvm|#ABI#| -Xmx512M -Xss32K " +
250 private String getWarningMessage() {
254 private void addCTSHostMethod(String pName, String method, MethodData md,
255 Set<String> dependentTestClassNames) {
257 final String targetCoreJarPath = String.format("%s/dot/junit/dexcore.jar",
261 String mjar = "Main_" + method + ".jar";
262 String pPath = pName.replaceAll("\\.","/");
263 String mainJar = String.format("%s/%s/%s", TARGET_JAR_ROOT_PATH, pPath, mjar);
265 String cp = String.format("%s:%s", targetCoreJarPath, mainJar);
266 for (String depFqcn : dependentTestClassNames) {
268 String sourceName = depFqcn.replaceAll("\\.", "/") + ".jar";
269 String targetName= String.format("%s/%s", TARGET_JAR_ROOT_PATH,
277 String mainclass = pName + ".Main_" + method;
285 String datafileContent = "";
294 for (Entry<String, List<String>> entry : map.entrySet()) {
296 String fqcn = entry.getKey();
298 String pName = fqcn.substring(0, lastDotPos);
299 String classOnlyName = fqcn.substring(lastDotPos + 1);
300 String instPrefix = "new " + classOnlyName + "()";
311 List<String> methods = entry.getValue();
312 Collections.sort(methods, new Comparator<String>() {
313 public int compare(String s1, String s2) {
318 for (String method : methods) {
334 String methodContent = md.methodBody;
336 Set<String> dependentTestClassNames = parseTestClassName(pName,
347 String content = getWarningMessage() +
384 String comment;
403 String line = pName + ".Main_" + method + ";";
404 for (String className : dependentTestClassNames) {
410 String[] pparts = pName.split("\\.");
412 String detail = pparts[pparts.length-1];
414 String type = pparts[pparts.length-2];
416 String description;
443 String details = (md.title != null ? md.title : "");
489 private void generateBuildStepFor(String pName, String method,
490 Set<String> dependentTestClassNames, Set<BuildStep> targets) {
493 for (String dependentTestClassName : dependentTestClassNames) {
498 private void generateBuildStepForDependant(String dependentTestClassName,
502 String fileName = dependentTestClassName.replace('.', '/').trim();
584 private BuildStep generateDexBuildStep(String classFileFolder,
585 String classFileName, BuildStep dependency) {
638 private Set<String> parseTestClassName(String pName, String classOnlyName,
639 String methodSource) {
640 Set<String> entries = new HashSet<String>();
641 String opcodeName = classOnlyName.substring(5);
645 String[] patterns = new String[] {"new\\s(T_" + opcodeName + "\\w*)",
648 String token = null;
649 for (String pattern : patterns) {
670 String res = m.group(1);
678 String res = loadMatcher.group(1);
686 String res = loadAndRunMatcher.group(1);
698 private MethodData parseTestMethod(String pname, String classOnlyName,
699 String method) {
701 String path = pname.replaceAll("\\.", "/");
702 String absPath = JAVASRC_FOLDER + "/" + path + "/" + classOnlyName + ".java";
713 String methodPattern = "public\\s+void\\s+" + method + "[^\\{]+\\{";
715 String token = scanner.findWithinHorizon(methodPattern, (int) f.length());
761 String all = new String(FileUtils.readFile(f));
764 String commentPattern = "/\\*\\*([^{]*)\\*/\\s*" + methodPattern;
767 String title = null, constraint = null;
769 String res = m.group(1);
809 private void writeToFileMkdir(File file, String content) {
817 private void writeToFile(File file, String content) {
824 String contents = new String(charContents);
844 private File getFileFromPackage(String pname, String methodName)
847 String path = getFileName(pname, methodName, ".java");
848 String absPath = MAIN_SRC_OUTPUT_FOLDER + "/" + path;
857 private String getFileName(String pname, String methodName,
858 String extension) {
859 String path = pname.replaceAll("\\.", "/");