45 }
46
47 private static void verifyInstall() throws Exception {
48 String app = JPackagePath.getLinuxInstalledApp(TEST_NAME);
49 JPackageInstallerHelper.validateApp(app);
50
51 }
52
53 private static void verifyUnInstall() throws Exception {
54 String folderPath = JPackagePath.getLinuxInstallFolder(TEST_NAME);
55 File folder = new File(folderPath);
56 if (folder.exists()) {
57 throw new AssertionError("Error: " + folder.getAbsolutePath() + " exist");
58 }
59 }
60
61 private static void init(String name, String ext) {
62 TEST_NAME = name;
63 EXT = ext;
64 if (EXT.equals("rpm")) {
65 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0-1.x86_64." + EXT;
66 } else {
67 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
68 }
69 CMD = new String [] {
70 "--package-type", EXT,
71 "--input", "input",
72 "--output", "output",
73 "--name", TEST_NAME,
74 "--main-jar", "hello.jar",
75 "--main-class", "Hello",
76 "--license-file", JPackagePath.getLicenseFilePath()};
77 }
78
79 public static void run(String name, String ext) throws Exception {
80 init(name, ext);
81
82 if (JPackageInstallerHelper.isVerifyInstall()) {
83 verifyInstall();
84 } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
85 verifyUnInstall();
|
45 }
46
47 private static void verifyInstall() throws Exception {
48 String app = JPackagePath.getLinuxInstalledApp(TEST_NAME);
49 JPackageInstallerHelper.validateApp(app);
50
51 }
52
53 private static void verifyUnInstall() throws Exception {
54 String folderPath = JPackagePath.getLinuxInstallFolder(TEST_NAME);
55 File folder = new File(folderPath);
56 if (folder.exists()) {
57 throw new AssertionError("Error: " + folder.getAbsolutePath() + " exist");
58 }
59 }
60
61 private static void init(String name, String ext) {
62 TEST_NAME = name;
63 EXT = ext;
64 if (EXT.equals("rpm")) {
65 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0-1." + Base.getRpmArch() + "." + EXT;
66 } else {
67 OUTPUT = "output" + File.separator + TEST_NAME + "-1.0." + EXT;
68 }
69 CMD = new String [] {
70 "--package-type", EXT,
71 "--input", "input",
72 "--output", "output",
73 "--name", TEST_NAME,
74 "--main-jar", "hello.jar",
75 "--main-class", "Hello",
76 "--license-file", JPackagePath.getLicenseFilePath()};
77 }
78
79 public static void run(String name, String ext) throws Exception {
80 init(name, ext);
81
82 if (JPackageInstallerHelper.isVerifyInstall()) {
83 verifyInstall();
84 } else if (JPackageInstallerHelper.isVerifyUnInstall()) {
85 verifyUnInstall();
|