1
1
/*
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.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
29
29
import java .util .Arrays ;
30
30
import java .util .function .Function ;
31
31
import java .util .stream .Collectors ;
32
+ import static jdk .internal .util .OperatingSystem .LINUX ;
33
+ import jdk .jpackage .test .Annotations .Test ;
32
34
import jdk .jpackage .test .JPackageCommand ;
33
35
import jdk .jpackage .test .PackageType ;
34
36
import jdk .jpackage .test .PackageTest ;
67
69
* @key jpackagePlatformPackage
68
70
* @build jdk.jpackage.test.*
69
71
* @compile LicenseTest.java
72
+ * @requires (jpackage.test.SQETest != null)
70
73
* @run main/othervm/timeout=360 -Xmx512m jdk.jpackage.test.Main
71
74
* --jpt-run=LicenseTest.testCommon
72
75
*/
78
81
* @key jpackagePlatformPackage
79
82
* @build jdk.jpackage.test.*
80
83
* @compile LicenseTest.java
81
- * @requires (os.family == "linux")
82
84
* @requires (jpackage.test.SQETest == null)
83
85
* @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
90
87
*/
91
88
92
89
public class LicenseTest {
90
+
91
+ @ Test
93
92
public static void testCommon () {
94
93
PackageTest test = new PackageTest ().configureHelloApp ()
95
94
.addInitializer (cmd -> {
@@ -102,26 +101,32 @@ public static void testCommon() {
102
101
test .run ();
103
102
}
104
103
104
+ @ Test (ifOS = LINUX )
105
105
public static void testLinuxLicenseInUsrTree () {
106
106
testLinuxLicenseInUsrTree ("/usr" );
107
107
}
108
108
109
+ @ Test (ifOS = LINUX )
109
110
public static void testLinuxLicenseInUsrTree2 () {
110
111
testLinuxLicenseInUsrTree ("/usr/local" );
111
112
}
112
113
114
+ @ Test (ifOS = LINUX )
113
115
public static void testLinuxLicenseInUsrTree3 () {
114
116
testLinuxLicenseInUsrTree ("/usr/foo" );
115
117
}
116
118
119
+ @ Test (ifOS = LINUX )
117
120
public static void testLinuxLicenseInUsrTree4 () {
118
121
testLinuxLicenseInUsrTree ("/usrbuz" );
119
122
}
120
123
124
+ @ Test (ifOS = LINUX )
121
125
public static void testCustomDebianCopyright () {
122
126
new CustomDebianCopyrightTest ().run ();
123
127
}
124
128
129
+ @ Test (ifOS = LINUX )
125
130
public static void testCustomDebianCopyrightSubst () {
126
131
new CustomDebianCopyrightTest ().withSubstitution (true ).run ();
127
132
}
0 commit comments