From 92f30fa33507272bfe43b70f5648a25f8aca1cfa Mon Sep 17 00:00:00 2001 From: Chuansheng Lu Date: Tue, 7 Apr 2020 17:31:30 +0800 Subject: [PATCH] [MultiTenant] Fixed build failure on Windows Summary: skip jgroup libraries on Windows Test Plan: jdk/test/multi-tenant Reviewed-by: kuaiwei, yuleil Issue: https://github.com/alibaba/dragonwell8/issues/92 --- make/CompileNativeLibraries.gmk | 4 +++- test/multi-tenant/TestGetAllTenantIDs.java | 2 ++ test/multi-tenant/TestJGroupDebugMode.sh | 2 ++ test/multi-tenant/TestNoJGroupInit.java | 2 ++ test/multi-tenant/TestStaticFieldIsolation.java | 2 ++ .../test/com/alibaba/tenant/TestCpuCfsThrottling.java | 2 ++ .../test/com/alibaba/tenant/TestHierachicalTenants.java | 2 ++ test/multi-tenant/test/com/alibaba/tenant/TestJGroup.java | 2 ++ test/multi-tenant/test/com/alibaba/tenant/TestJGroupInit.java | 2 ++ test/multi-tenant/test/com/alibaba/tenant/TestJMX.java | 2 ++ .../test/com/alibaba/tenant/TestTenantConfiguration.java | 2 ++ .../test/com/alibaba/tenant/TestTenantContainer.java | 2 ++ .../test/com/alibaba/tenant/TestTenantContainerFactory.java | 2 ++ .../test/com/alibaba/tenant/TestTenantGlobals.java | 2 ++ 14 files changed, 29 insertions(+), 1 deletion(-) diff --git a/make/CompileNativeLibraries.gmk b/make/CompileNativeLibraries.gmk index b7b477d73..f314ba601 100644 --- a/make/CompileNativeLibraries.gmk +++ b/make/CompileNativeLibraries.gmk @@ -87,7 +87,9 @@ include lib/Awt2dLibraries.gmk include lib/SoundLibraries.gmk -include lib/JGroupLibraries.gmk +ifeq ($(OPENJDK_TARGET_OS), linux) + include lib/JGroupLibraries.gmk +endif # Include the corresponding custom file, if present. -include $(CUSTOM_MAKE_DIR)/CompileNativeLibraries.gmk diff --git a/test/multi-tenant/TestGetAllTenantIDs.java b/test/multi-tenant/TestGetAllTenantIDs.java index 9c976e62d..366e4238b 100644 --- a/test/multi-tenant/TestGetAllTenantIDs.java +++ b/test/multi-tenant/TestGetAllTenantIDs.java @@ -21,6 +21,8 @@ /* * @test + * @requires os.family == "Linux" + * @requires os.arch == "amd64" * @summary Test data structure integrity while access TenantContainer.tenantContainerMap concurrently * @library /lib/testlibrary * @build TestGetAllTenantIDs diff --git a/test/multi-tenant/TestJGroupDebugMode.sh b/test/multi-tenant/TestJGroupDebugMode.sh index 763f2a20d..1f55652bf 100644 --- a/test/multi-tenant/TestJGroupDebugMode.sh +++ b/test/multi-tenant/TestJGroupDebugMode.sh @@ -23,6 +23,8 @@ # # @test TestJGroupDebugMode.sh +# @requires os.family == "Linux" +# @requires os.arch == "amd64" # @summary test debugging mode of JGroup native implementation # @run shell/timeout=300 TestJGroupDebugMode.sh # diff --git a/test/multi-tenant/TestNoJGroupInit.java b/test/multi-tenant/TestNoJGroupInit.java index 334b300dd..5ca3727e0 100644 --- a/test/multi-tenant/TestNoJGroupInit.java +++ b/test/multi-tenant/TestNoJGroupInit.java @@ -21,6 +21,8 @@ import java.lang.reflect.Field; /* @test + * @requires os.family == "Linux" + * @requires os.arch == "amd64" * @summary test scenario where JGroup will not be initialized * @compile TestNoJGroupInit.java * @run main/othervm/timeout=300 -XX:+MultiTenant TestNoJGroupInit diff --git a/test/multi-tenant/TestStaticFieldIsolation.java b/test/multi-tenant/TestStaticFieldIsolation.java index d8f3c3de2..e1e868dde 100644 --- a/test/multi-tenant/TestStaticFieldIsolation.java +++ b/test/multi-tenant/TestStaticFieldIsolation.java @@ -1,6 +1,8 @@ /* * @test + * @requires os.family == "Linux" + * @requires os.arch == "amd64" * @summary Test isolation of various static fields * @library /lib/testlibrary * @run main/othervm -XX:+UseG1GC -XX:+MultiTenant -XX:+TenantDataIsolation TestStaticFieldIsolation diff --git a/test/multi-tenant/test/com/alibaba/tenant/TestCpuCfsThrottling.java b/test/multi-tenant/test/com/alibaba/tenant/TestCpuCfsThrottling.java index 77bda0e75..56bdbf0ad 100644 --- a/test/multi-tenant/test/com/alibaba/tenant/TestCpuCfsThrottling.java +++ b/test/multi-tenant/test/com/alibaba/tenant/TestCpuCfsThrottling.java @@ -32,6 +32,8 @@ import static jdk.testlibrary.Asserts.*; /* * @test + * @requires os.family == "Linux" + * @requires os.arch == "amd64" * @summary test.com.alibaba.tenant.TestCpuCfsThrottling * @library /lib/testlibrary * @run main/othervm/bootclasspath -Xint -XX:+MultiTenant -XX:+TenantCpuThrottling -XX:+TenantCpuAccounting diff --git a/test/multi-tenant/test/com/alibaba/tenant/TestHierachicalTenants.java b/test/multi-tenant/test/com/alibaba/tenant/TestHierachicalTenants.java index 104a046b4..c049f0737 100644 --- a/test/multi-tenant/test/com/alibaba/tenant/TestHierachicalTenants.java +++ b/test/multi-tenant/test/com/alibaba/tenant/TestHierachicalTenants.java @@ -27,6 +27,8 @@ import static jdk.testlibrary.Asserts.*; /* * @test + * @requires os.family == "Linux" + * @requires os.arch == "amd64" * @summary Test hierarchical tenants support * @library /lib/testlibrary * @run main/othervm/bootclasspath -XX:+MultiTenant -XX:+TenantCpuThrottling -Xmx200m -Xms200m diff --git a/test/multi-tenant/test/com/alibaba/tenant/TestJGroup.java b/test/multi-tenant/test/com/alibaba/tenant/TestJGroup.java index d153f85ea..4d58eb0c6 100644 --- a/test/multi-tenant/test/com/alibaba/tenant/TestJGroup.java +++ b/test/multi-tenant/test/com/alibaba/tenant/TestJGroup.java @@ -31,6 +31,8 @@ import static java.nio.file.StandardOpenOption.WRITE; /* * @test + * @requires os.family == "Linux" + * @requires os.arch == "amd64" * @summary Test JGroup * @library /lib/testlibrary * @run main/othervm/bootclasspath -XX:+MultiTenant -XX:+TenantCpuAccounting -XX:+TenantCpuThrottling -XX:+UseG1GC -Xmx200m -Xms200m -Dcom.alibaba.tenant.DebugJGroup=true com.alibaba.tenant.TestJGroup diff --git a/test/multi-tenant/test/com/alibaba/tenant/TestJGroupInit.java b/test/multi-tenant/test/com/alibaba/tenant/TestJGroupInit.java index d9210791b..77b7a6060 100644 --- a/test/multi-tenant/test/com/alibaba/tenant/TestJGroupInit.java +++ b/test/multi-tenant/test/com/alibaba/tenant/TestJGroupInit.java @@ -34,6 +34,8 @@ import static jdk.testlibrary.Asserts.*; /* * @test + * @requires os.family == "Linux" + * @requires os.arch == "amd64" * @summary Test initialization code of JGroup * @library /lib/testlibrary * @run main/othervm/bootclasspath -XX:+MultiTenant -XX:+TenantCpuThrottling -XX:+UseG1GC diff --git a/test/multi-tenant/test/com/alibaba/tenant/TestJMX.java b/test/multi-tenant/test/com/alibaba/tenant/TestJMX.java index 6b49bf6b8..0e4b399a3 100644 --- a/test/multi-tenant/test/com/alibaba/tenant/TestJMX.java +++ b/test/multi-tenant/test/com/alibaba/tenant/TestJMX.java @@ -15,6 +15,8 @@ import com.alibaba.tenant.TenantContainer; import com.alibaba.tenant.TenantException; /* @test + * @requires os.family == "Linux" + * @requires os.arch == "amd64" * @summary JMX related unit tests * @library /lib/testlibrary * @compile TestJMX.java diff --git a/test/multi-tenant/test/com/alibaba/tenant/TestTenantConfiguration.java b/test/multi-tenant/test/com/alibaba/tenant/TestTenantConfiguration.java index 668e53bdf..ac3fad09e 100644 --- a/test/multi-tenant/test/com/alibaba/tenant/TestTenantConfiguration.java +++ b/test/multi-tenant/test/com/alibaba/tenant/TestTenantConfiguration.java @@ -21,6 +21,8 @@ package com.alibaba.tenant; /* @test + * @requires os.family == "Linux" + * @requires os.arch == "amd64" * @summary test TenantConfiguration facilities * @library /lib/testlibrary * @run main/othervm/bootclasspath -XX:+MultiTenant -XX:+UseG1GC -XX:+TenantCpuThrottling diff --git a/test/multi-tenant/test/com/alibaba/tenant/TestTenantContainer.java b/test/multi-tenant/test/com/alibaba/tenant/TestTenantContainer.java index 76439e281..f270f6ef8 100644 --- a/test/multi-tenant/test/com/alibaba/tenant/TestTenantContainer.java +++ b/test/multi-tenant/test/com/alibaba/tenant/TestTenantContainer.java @@ -37,6 +37,8 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.stream.IntStream; /* @test + * @requires os.family == "Linux" + * @requires os.arch == "amd64" * @summary unit tests for com.alibaba.tenant.TenantContainer * @library /lib/testlibrary * @compile TestTenantContainer.java diff --git a/test/multi-tenant/test/com/alibaba/tenant/TestTenantContainerFactory.java b/test/multi-tenant/test/com/alibaba/tenant/TestTenantContainerFactory.java index a9b86adce..2c5b38b02 100644 --- a/test/multi-tenant/test/com/alibaba/tenant/TestTenantContainerFactory.java +++ b/test/multi-tenant/test/com/alibaba/tenant/TestTenantContainerFactory.java @@ -32,6 +32,8 @@ import static jdk.testlibrary.Asserts.*; /* * @test + * @requires os.family == "Linux" + * @requires os.arch == "amd64" * @library /lib/testlibrary * @summary test RCM API based TenantContainerFactory * @run main/othervm/bootclasspath -XX:+MultiTenant com.alibaba.tenant.TestTenantContainerFactory diff --git a/test/multi-tenant/test/com/alibaba/tenant/TestTenantGlobals.java b/test/multi-tenant/test/com/alibaba/tenant/TestTenantGlobals.java index 912e6006f..e25fdc868 100644 --- a/test/multi-tenant/test/com/alibaba/tenant/TestTenantGlobals.java +++ b/test/multi-tenant/test/com/alibaba/tenant/TestTenantGlobals.java @@ -28,6 +28,8 @@ import com.alibaba.tenant.TenantGlobals; import static org.junit.Assert.*; /* @test + * @requires os.family == "Linux" + * @requires os.arch == "amd64" * @summary unit tests for com.alibaba.tenant.TenantGlobals * @library /lib/testlibrary * @compile TestTenantGlobals.java -- GitLab