6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.oracle.bundlers.windows;
27
28 import static com.oracle.bundlers.StandardBundlerParam.APP_NAME;
29 import static com.oracle.bundlers.StandardBundlerParam.APP_RESOURCES;
30 import static com.oracle.bundlers.StandardBundlerParam.BUILD_ROOT;
31 import static com.oracle.bundlers.StandardBundlerParam.MAIN_CLASS;
32 import static com.oracle.bundlers.StandardBundlerParam.VERBOSE;
33
34 import org.junit.After;
35 import org.junit.Assume;
36 import org.junit.Before;
37 import org.junit.BeforeClass;
38 import org.junit.Test;
39 import static org.junit.Assert.*;
40
41 import java.io.File;
42 import java.io.IOException;
43 import java.nio.file.Files;
44 import java.util.Arrays;
45 import java.util.HashMap;
46 import java.util.HashSet;
47 import java.util.Map;
48 import java.util.Set;
49
50 import com.oracle.bundlers.Bundler;
51 import com.sun.javafx.tools.packager.Log;
52 import com.sun.javafx.tools.packager.bundlers.ConfigException;
53 import com.sun.javafx.tools.packager.bundlers.RelativeFileSet;
54 import com.sun.javafx.tools.packager.bundlers.UnsupportedPlatformException;
55 import com.sun.javafx.tools.packager.bundlers.WinAppBundler;
56 import com.sun.javafx.tools.packager.bundlers.WinServiceBundler;
57
58 public class WinServiceBundlerTest {
59
60 static File tmpBase;
61 static File workDir;
62 static boolean retain = false;
63
64 @BeforeClass
65 public static void prepareApp() {
66 // only run on windows
67 Assume.assumeTrue(System.getProperty("os.name").toLowerCase().startsWith("win"));
68
69 Log.setLogger(new Log.Logger(true));
70
71 retain = Boolean.parseBoolean(System.getProperty("RETAIN_PACKAGER_TESTS"));
72 workDir = new File("build/tmp/tests", "winservice");
73 }
74
75 @Before
76 public void createTmpDir() throws IOException {
|
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.oracle.tools.packager.windows;
27
28 import static com.oracle.tools.packager.StandardBundlerParam.APP_NAME;
29 import static com.oracle.tools.packager.StandardBundlerParam.BUILD_ROOT;
30 import static com.oracle.tools.packager.StandardBundlerParam.VERBOSE;
31
32 import org.junit.After;
33 import org.junit.Assume;
34 import org.junit.Before;
35 import org.junit.BeforeClass;
36 import org.junit.Test;
37 import static org.junit.Assert.*;
38
39 import java.io.File;
40 import java.io.IOException;
41 import java.nio.file.Files;
42 import java.util.HashMap;
43 import java.util.Map;
44
45 import com.oracle.tools.packager.Bundler;
46 import com.oracle.tools.packager.Log;
47 import com.oracle.tools.packager.ConfigException;
48 import com.oracle.tools.packager.UnsupportedPlatformException;
49
50 public class WinServiceBundlerTest {
51
52 static File tmpBase;
53 static File workDir;
54 static boolean retain = false;
55
56 @BeforeClass
57 public static void prepareApp() {
58 // only run on windows
59 Assume.assumeTrue(System.getProperty("os.name").toLowerCase().startsWith("win"));
60
61 Log.setLogger(new Log.Logger(true));
62
63 retain = Boolean.parseBoolean(System.getProperty("RETAIN_PACKAGER_TESTS"));
64 workDir = new File("build/tmp/tests", "winservice");
65 }
66
67 @Before
68 public void createTmpDir() throws IOException {
|