Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JavaTestUtil for all tck #4512

Merged
merged 1 commit into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 79 additions & 9 deletions jck/agent-drive.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,84 @@
#!/bin/bash
#!/bin/bash -ue

echo "Starting JCK agent.."
karianna marked this conversation as resolved.
Show resolved Hide resolved
eval $1
jckAgentPID=0
rmiRegistryPID=0
rmidPID=0
tnameservPID=0

pid=$!
startJCKAgent() {
echo "Starting JCK agent.."
eval $1
jckAgentPID=$!
echo "Agent started with PID $jckAgentPID"
}

echo "Agent started with PID $pid"
stopJCKAgent() {
echo "Test complete. Stopping JCK Agent.."
kill -9 $jckAgentPID
}

echo "Starting JCK harness.."
eval $2
startJCKHarness() {
echo "Starting JCK harness.."
eval $1
}

echo "Test complete. Stopping JCK Agent.."
kill -9 $pid
startRMIRegistry() {
echo "Starting RMI Registry.."
eval $1
rmiRegistryPID=$!
echo "RMI Registry started with PID $rmiRegistryPID"
}

stopRMIRegistry() {
echo "Stopping RMI Registry.."
kill -9 $rmiRegistryPID
}

startRMID() {
echo "Starting RMID.."
eval $1
rmidPID=$!
echo "RMID started with PID $rmidPID"
}

stopRMID() {
echo "Stopping RMID.."
kill -9 $rmidPID
}

startTNameServ() {
echo "Starting TNAMESERV.."
eval $1
tnameservPID=$!
echo "TNAMESERV started with PID $tnameservPID"
}

stopTNameServ() {
echo "Stopping TNAMESERV.."
kill -9 $tnameservPID
}

if [ $# -eq 2 ]; then
startJCKAgent "$1"
startJCKHarness "$2"
stopJCKAgent
elif [ $# -eq 4 ]; then
startRMIRegistry "$1"
startRMID "$2"
startJCKAgent "$3"
startJCKHarness "$4"
stopRMIRegistry
stopRMID
stopJCKAgent
elif [ $# -eq 5 ]; then
startRMIRegistry "$1"
startRMID "$2"
startTNameServ "$3"
startJCKAgent "$4"
startJCKHarness "$5"
stopRMIRegistry
stopRMID
stopJCKAgent
stopTNameServ
stopJCKAgent
fi
20 changes: 15 additions & 5 deletions jck/compiler.api/playlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
<variations>
<variation>NoOptions</variation>
</variations>
<command>$(JCK_CMD_TEMPLATE) tests=api/java_rmi testsuite=COMPILER; \
<command>$(GEN_JTB_GENERIC) tests=api/java_rmi testsuite=COMPILER; \
$(EXEC_COMPILER_TEST); \
$(GEN_SUMMARY_GENERIC) tests=api/java_rmi testsuite=COMPILER; \
$(TEST_STATUS)</command>
<levels>
<level>extended</level>
Expand All @@ -47,7 +49,9 @@
<variations>
<variation>NoOptions</variation>
</variations>
<command>$(JCK_CMD_TEMPLATE) tests=api/javax_annotation testsuite=COMPILER; \
<command>$(GEN_JTB_GENERIC) tests=api/javax_annotation testsuite=COMPILER; \
$(EXEC_COMPILER_TEST); \
$(GEN_SUMMARY_GENERIC) tests=api/javax_annotation testsuite=COMPILER; \
$(TEST_STATUS)</command>
<levels>
<level>extended</level>
Expand All @@ -61,7 +65,9 @@
<variations>
<variation>NoOptions</variation>
</variations>
<command>$(JCK_CMD_TEMPLATE) tests=api/javax_lang testsuite=COMPILER; \
<command>$(GEN_JTB_GENERIC) tests=api/javax_lang testsuite=COMPILER; \
$(EXEC_COMPILER_TEST); \
$(GEN_SUMMARY_GENERIC) tests=api/javax_lang testsuite=COMPILER; \
$(TEST_STATUS)</command>
<levels>
<level>extended</level>
Expand All @@ -83,7 +89,9 @@
<variations>
<variation>NoOptions</variation>
</variations>
<command>$(JCK_CMD_TEMPLATE) tests=api/javax_tools testsuite=COMPILER; \
<command>$(GEN_JTB_GENERIC) tests=api/javax_tools testsuite=COMPILER; \
$(EXEC_COMPILER_TEST); \
$(GEN_SUMMARY_GENERIC) tests=api/javax_tools testsuite=COMPILER; \
$(TEST_STATUS)</command>
<levels>
<level>sanity</level>
Expand All @@ -105,7 +113,9 @@
<variations>
<variation>NoOptions</variation>
</variations>
<command>$(JCK_CMD_TEMPLATE) tests=api/signaturetest testsuite=COMPILER; \
<command>$(GEN_JTB_GENERIC) tests=api/signaturetest testsuite=COMPILER; \
$(EXEC_COMPILER_TEST); \
$(GEN_SUMMARY_GENERIC) tests=api/signaturetest testsuite=COMPILER; \
$(TEST_STATUS)</command>
<levels>
<level>sanity</level>
Expand Down
Loading