11/*
2- * Copyright (c) 2018, 2024 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2018, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2929import java .util .Arrays ;
3030import java .util .function .Function ;
3131import java .util .stream .Collectors ;
32+ import static jdk .internal .util .OperatingSystem .LINUX ;
33+ import jdk .jpackage .test .Annotations .Test ;
3234import jdk .jpackage .test .JPackageCommand ;
3335import jdk .jpackage .test .PackageType ;
3436import jdk .jpackage .test .PackageTest ;
6769 * @key jpackagePlatformPackage
6870 * @build jdk.jpackage.test.*
6971 * @compile LicenseTest.java
72+ * @requires (jpackage.test.SQETest != null)
7073 * @run main/othervm/timeout=360 -Xmx512m jdk.jpackage.test.Main
7174 * --jpt-run=LicenseTest.testCommon
7275 */
7881 * @key jpackagePlatformPackage
7982 * @build jdk.jpackage.test.*
8083 * @compile LicenseTest.java
81- * @requires (os.family == "linux")
8284 * @requires (jpackage.test.SQETest == null)
8385 * @run main/othervm/timeout=1440 -Xmx512m jdk.jpackage.test.Main
84- * --jpt-run=LicenseTest.testCustomDebianCopyright
85- * --jpt-run=LicenseTest.testCustomDebianCopyrightSubst
86- * --jpt-run=LicenseTest.testLinuxLicenseInUsrTree
87- * --jpt-run=LicenseTest.testLinuxLicenseInUsrTree2
88- * --jpt-run=LicenseTest.testLinuxLicenseInUsrTree3
89- * --jpt-run=LicenseTest.testLinuxLicenseInUsrTree4
86+ * --jpt-run=LicenseTest
9087 */
9188
9289public class LicenseTest {
90+
91+ @ Test
9392 public static void testCommon () {
9493 PackageTest test = new PackageTest ().configureHelloApp ()
9594 .addInitializer (cmd -> {
@@ -102,26 +101,32 @@ public static void testCommon() {
102101 test .run ();
103102 }
104103
104+ @ Test (ifOS = LINUX )
105105 public static void testLinuxLicenseInUsrTree () {
106106 testLinuxLicenseInUsrTree ("/usr" );
107107 }
108108
109+ @ Test (ifOS = LINUX )
109110 public static void testLinuxLicenseInUsrTree2 () {
110111 testLinuxLicenseInUsrTree ("/usr/local" );
111112 }
112113
114+ @ Test (ifOS = LINUX )
113115 public static void testLinuxLicenseInUsrTree3 () {
114116 testLinuxLicenseInUsrTree ("/usr/foo" );
115117 }
116118
119+ @ Test (ifOS = LINUX )
117120 public static void testLinuxLicenseInUsrTree4 () {
118121 testLinuxLicenseInUsrTree ("/usrbuz" );
119122 }
120123
124+ @ Test (ifOS = LINUX )
121125 public static void testCustomDebianCopyright () {
122126 new CustomDebianCopyrightTest ().run ();
123127 }
124128
129+ @ Test (ifOS = LINUX )
125130 public static void testCustomDebianCopyrightSubst () {
126131 new CustomDebianCopyrightTest ().withSubstitution (true ).run ();
127132 }
0 commit comments