27 import java.io.File;
28 import java.io.IOException;
29 import java.nio.file.DirectoryStream;
30 import java.nio.file.Files;
31 import java.nio.file.Path;
32 import java.nio.file.Paths;
33 import java.util.ArrayList;
34 import java.util.Collections;
35 import java.util.List;
36
37 /**
38 *
39 * @author andrey.rusakov@oracle.com
40 */
41 public class GoldenImageManager {
42
43 private static final String IMG_VERSION = "-\\d+";
44 private static final String IMG_FOLDER = "images-svn";
45
46 private static File getImagesRoot() throws IOException {
47 return new File("../", IMG_FOLDER).getCanonicalFile();
48 }
49
50 private static String getSuiteName() throws IOException {
51 return new File(".").getCanonicalFile().getName();
52 }
53
54 //Requires -XaddExports:javafx.graphics/com.sun.prism=ALL-UNNAMED to work in JDK9
55 private static String getRenderingMode() {
56 GraphicsPipeline pipeline = com.sun.prism.GraphicsPipeline.getPipeline();
57 return pipeline.getClass().getName().endsWith("J2DPipeline")
58 || pipeline.getClass().getName().endsWith("SWPipeline") ? "j2d" : "prism";
59 }
60
61 private static String getPlatformAlias() {
62 String os = System.getProperty("os.name").toLowerCase();
63 String version = System.getProperty("os.version").toLowerCase();
64 if (os.contains("win")) {
65 if (version.startsWith("5.")) {
66 return "xp";
67 } else if (version.startsWith("6.2")
|
27 import java.io.File;
28 import java.io.IOException;
29 import java.nio.file.DirectoryStream;
30 import java.nio.file.Files;
31 import java.nio.file.Path;
32 import java.nio.file.Paths;
33 import java.util.ArrayList;
34 import java.util.Collections;
35 import java.util.List;
36
37 /**
38 *
39 * @author andrey.rusakov@oracle.com
40 */
41 public class GoldenImageManager {
42
43 private static final String IMG_VERSION = "-\\d+";
44 private static final String IMG_FOLDER = "images-svn";
45
46 private static File getImagesRoot() throws IOException {
47 return new File("./", IMG_FOLDER).getCanonicalFile();
48 }
49
50 private static String getSuiteName() throws IOException {
51 return new File(".").getCanonicalFile().getName();
52 }
53
54 //Requires -XaddExports:javafx.graphics/com.sun.prism=ALL-UNNAMED to work in JDK9
55 private static String getRenderingMode() {
56 GraphicsPipeline pipeline = com.sun.prism.GraphicsPipeline.getPipeline();
57 return pipeline.getClass().getName().endsWith("J2DPipeline")
58 || pipeline.getClass().getName().endsWith("SWPipeline") ? "j2d" : "prism";
59 }
60
61 private static String getPlatformAlias() {
62 String os = System.getProperty("os.name").toLowerCase();
63 String version = System.getProperty("os.version").toLowerCase();
64 if (os.contains("win")) {
65 if (version.startsWith("5.")) {
66 return "xp";
67 } else if (version.startsWith("6.2")
|