7192744: fix up tests to accommodate jtreg spec change

Mon, 20 Aug 2012 13:50:04 -0700

author
jjg
date
Mon, 20 Aug 2012 13:50:04 -0700
changeset 1308
37008b4cd97a
parent 1307
464f52f59f7d
child 1309
c9749226cdde

7192744: fix up tests to accommodate jtreg spec change
Reviewed-by: darcy

test/tools/javac/processing/6348499/T6348499.java file | annotate | diff | comparison | revisions
test/tools/javac/processing/T6920317.java file | annotate | diff | comparison | revisions
     1.1 --- a/test/tools/javac/processing/6348499/T6348499.java	Mon Aug 20 21:24:10 2012 +0530
     1.2 +++ b/test/tools/javac/processing/6348499/T6348499.java	Mon Aug 20 13:50:04 2012 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -47,6 +47,7 @@
    1.11      public static void main(String... args) {
    1.12          String testSrc = System.getProperty("test.src", ".");
    1.13          String testClasses = System.getProperty("test.classes");
    1.14 +        String testClassPath = System.getProperty("test.class.path", testClasses);
    1.15          String A_java = new File(testSrc, "A.java").getPath();
    1.16          JavacTool tool = JavacTool.create();
    1.17          MyDiagListener dl = new MyDiagListener();
    1.18 @@ -55,7 +56,7 @@
    1.19              fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(testSrc, "A.java")));
    1.20          Iterable<String> opts = Arrays.asList("-proc:only",
    1.21                                                "-processor", "A",
    1.22 -                                              "-processorpath", testClasses);
    1.23 +                                              "-processorpath", testClassPath);
    1.24          StringWriter out = new StringWriter();
    1.25          JavacTask task = tool.getTask(out, fm, dl, opts, null, files);
    1.26          task.call();
     2.1 --- a/test/tools/javac/processing/T6920317.java	Mon Aug 20 21:24:10 2012 +0530
     2.2 +++ b/test/tools/javac/processing/T6920317.java	Mon Aug 20 13:50:04 2012 -0700
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
     2.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8   *
     2.9   * This code is free software; you can redistribute it and/or modify it
    2.10 @@ -156,7 +156,9 @@
    2.11          String expect = null;
    2.12  
    2.13          opts.add("-processorpath");
    2.14 -        opts.add(System.getProperty("test.classes"));
    2.15 +        String testClasses = System.getProperty("test.classes");
    2.16 +        String testClassPath = System.getProperty("test.class.path", testClasses);
    2.17 +        opts.add(testClassPath);
    2.18          opts.add("-processor");
    2.19          opts.add(Processor.class.getName());
    2.20          opts.add("-proc:only");

mercurial