Skip to content

Commit 97dd06c

Browse files
author
Alexey Semenyuk
committedJan 9, 2025
8347299: Add annotations to test cases in LicenseTest
Reviewed-by: almatvee
1 parent 0a35ebf commit 97dd06c

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed
 

‎test/jdk/tools/jpackage/share/LicenseTest.java

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
@@ -29,6 +29,8 @@
2929
import java.util.Arrays;
3030
import java.util.function.Function;
3131
import java.util.stream.Collectors;
32+
import static jdk.internal.util.OperatingSystem.LINUX;
33+
import jdk.jpackage.test.Annotations.Test;
3234
import jdk.jpackage.test.JPackageCommand;
3335
import jdk.jpackage.test.PackageType;
3436
import jdk.jpackage.test.PackageTest;
@@ -67,6 +69,7 @@
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
*/
@@ -78,18 +81,14 @@
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

9289
public 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

Comments
 (0)
Please sign in to comment.