From 44b0afdbfc1667975cf44bc7d6f12e15b36abd2c Mon Sep 17 00:00:00 2001 From: Jiri Date: Fri, 19 Apr 2024 10:19:24 +0200 Subject: [PATCH] Properly passing AGENT_HOSTNAME into the runner --- cryptotest/tests/GssApiMechanismTests.java | 2 +- cryptotest/tests/SaslServerFactoryTests.java | 2 +- run.sh | 13 ++++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cryptotest/tests/GssApiMechanismTests.java b/cryptotest/tests/GssApiMechanismTests.java index fd10742..cc12668 100644 --- a/cryptotest/tests/GssApiMechanismTests.java +++ b/cryptotest/tests/GssApiMechanismTests.java @@ -28,7 +28,7 @@ * java.security.jgss/sun.security.jgss * java.security.jgss/sun.security.jgss.krb5 * java.security.jgss/sun.security.krb5 - * @bug 1022017 + * @bug 1022017 1066099 * @library / * @build cryptotest.tests.GssApiMechanismTests * cryptotest.Settings diff --git a/cryptotest/tests/SaslServerFactoryTests.java b/cryptotest/tests/SaslServerFactoryTests.java index f24f5a5..ba0100c 100644 --- a/cryptotest/tests/SaslServerFactoryTests.java +++ b/cryptotest/tests/SaslServerFactoryTests.java @@ -25,7 +25,7 @@ /* * @test * @modules java.base/java.security:open - * @bug 1422738 + * @bug 1422738 1066099 * @library / * @build cryptotest.tests.SaslServerFactoryTests * cryptotest.Settings diff --git a/run.sh b/run.sh index 65f79d8..52935e1 100755 --- a/run.sh +++ b/run.sh @@ -122,7 +122,18 @@ fi AGENT_OPT="" if [ -n "${SKIP_AGENT_TESTS:-}" ] ; then - AGENT_OPT="-javaoption:-Dcryptotests.skipAgentTests=1" + AGENT_OPT="-javaoption:-Dcryptotests.skipAgentTests=1" +else + if [ -n "${AGENT_HOSTNAME:-}" ] ; then + AGENT_OPT="-javaoption:-Dcryptotests.agentHostName=$AGENT_HOSTNAME" + else + echo "You have not set SKIP_AGENT_TESTS and you have empty AGENT_HOSTNAME" + echo "set SKIP_AGENT_TESTS to false or 1 to skip kdc requiring tests, or.. better" + echo "set AGENT_HOSTNAME to host, where the kerberos server resides, to run also all SaslServerFactoryTests and GssApiMechanismTests" + echo "The automated creation of this server is limited, and work in progress" + exit 1 + fi + fi echo Running with $JAVA...