Skip to content

Commit 62d93f2

Browse files
committed
8346050: Update BuildTestLib.gmk to build whole testlibrary
Reviewed-by: weijun, ihse
1 parent e1d0a9c commit 62d93f2

File tree

5 files changed

+21
-6
lines changed

5 files changed

+21
-6
lines changed

make/test/BuildTestLib.gmk

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,14 @@ $(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \
5252

5353
TARGETS += $(BUILD_WB_JAR)
5454

55+
ifeq ($(call isTargetOs, linux), false)
56+
BUILD_TEST_LIB_JAR_EXCLUDES := jdk/test/lib/containers
57+
endif
58+
5559
$(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
5660
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
5761
SRC := $(TEST_LIB_SOURCE_DIR), \
58-
EXCLUDES := jdk/test/lib/containers jdk/test/lib/security, \
62+
EXCLUDES := $(BUILD_TEST_LIB_JAR_EXCLUDES), \
5963
BIN := $(TEST_LIB_SUPPORT)/test-lib_classes, \
6064
HEADERS := $(TEST_LIB_SUPPORT)/test-lib_headers, \
6165
JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \
@@ -64,6 +68,10 @@ $(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
6468
--add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED \
6569
--add-exports java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED \
6670
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
71+
--add-exports java.base/jdk.internal.platform=ALL-UNNAMED \
72+
--add-exports java.base/sun.security.pkcs=ALL-UNNAMED \
73+
--add-exports java.base/sun.security.tools.keytool=ALL-UNNAMED \
74+
--add-exports java.base/sun.security.x509=ALL-UNNAMED \
6775
--enable-preview, \
6876
))
6977

test/lib/jdk/test/lib/security/CertUtils.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 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
@@ -21,7 +21,7 @@
2121
* questions.
2222
*/
2323

24-
/**
24+
/*
2525
*
2626
* @author Sean Mullan
2727
* @author Steve Hanna
@@ -645,7 +645,9 @@ private static String readFile(String relativeFilePath,
645645
* This class is useful for overriding one or more methods of an
646646
* X509Certificate for testing purposes.
647647
*/
648+
@SuppressWarnings("deprecation")
648649
public static class ForwardingX509Certificate extends X509Certificate {
650+
private static final long serialVersionUID = -8453912214640985478L;
649651
private final X509Certificate cert;
650652
public ForwardingX509Certificate(X509Certificate cert) {
651653
this.cert = cert;

test/lib/jdk/test/lib/security/FixedSecureRandom.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2024, 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
@@ -37,6 +37,8 @@
3737
/// bytes are exhausted.
3838
public class FixedSecureRandom extends SecureRandom {
3939

40+
private static final long serialVersionUID = -8753752741562231543L;
41+
4042
private byte[] buffer;
4143
private int offset;
4244

test/lib/jdk/test/lib/security/SeededSecureRandom.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2024, 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
@@ -35,6 +35,8 @@
3535
*/
3636
public class SeededSecureRandom extends SecureRandom {
3737

38+
private static final long serialVersionUID = 4657031557630518194L;
39+
3840
private final Random rnd;
3941

4042
public static long seed() {

test/lib/jdk/test/lib/security/XMLUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 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
@@ -559,6 +559,7 @@ public KeySelectorResult select(KeyInfo keyInfo,
559559
/**
560560
* Adds a new rule to "jdk.xml.dsig.secureValidationPolicy"
561561
*/
562+
@SuppressWarnings("dangling-doc-comments")
562563
public static void addPolicy(String rule) {
563564
String value = Security.getProperty("jdk.xml.dsig.secureValidationPolicy");
564565
value = rule + "," + value;

0 commit comments

Comments
 (0)