Skip to content

Commit

Permalink
Revert "Use JavaTestUtil for all tck (adoptium#4512)"
Browse files Browse the repository at this point in the history
This reverts commit d4e8916.
  • Loading branch information
sxa committed Jun 2, 2023
1 parent 8810350 commit 3f424ad
Show file tree
Hide file tree
Showing 14 changed files with 388 additions and 783 deletions.
88 changes: 9 additions & 79 deletions jck/agent-drive.sh
Original file line number Diff line number Diff line change
@@ -1,84 +1,14 @@
#!/bin/bash -ue
#!/bin/bash

jckAgentPID=0
rmiRegistryPID=0
rmidPID=0
tnameservPID=0
echo "Starting JCK agent.."
eval $1

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

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

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

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
echo "Test complete. Stopping JCK Agent.."
kill -9 $pid
20 changes: 5 additions & 15 deletions jck/compiler.api/playlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
<variations>
<variation>NoOptions</variation>
</variations>
<command>$(GEN_JTB_GENERIC) tests=api/java_rmi testsuite=COMPILER; \
$(EXEC_COMPILER_TEST); \
$(GEN_SUMMARY_GENERIC) tests=api/java_rmi testsuite=COMPILER; \
<command>$(JCK_CMD_TEMPLATE) tests=api/java_rmi testsuite=COMPILER; \
$(TEST_STATUS)</command>
<levels>
<level>extended</level>
Expand All @@ -49,9 +47,7 @@
<variations>
<variation>NoOptions</variation>
</variations>
<command>$(GEN_JTB_GENERIC) tests=api/javax_annotation testsuite=COMPILER; \
$(EXEC_COMPILER_TEST); \
$(GEN_SUMMARY_GENERIC) tests=api/javax_annotation testsuite=COMPILER; \
<command>$(JCK_CMD_TEMPLATE) tests=api/javax_annotation testsuite=COMPILER; \
$(TEST_STATUS)</command>
<levels>
<level>extended</level>
Expand All @@ -65,9 +61,7 @@
<variations>
<variation>NoOptions</variation>
</variations>
<command>$(GEN_JTB_GENERIC) tests=api/javax_lang testsuite=COMPILER; \
$(EXEC_COMPILER_TEST); \
$(GEN_SUMMARY_GENERIC) tests=api/javax_lang testsuite=COMPILER; \
<command>$(JCK_CMD_TEMPLATE) tests=api/javax_lang testsuite=COMPILER; \
$(TEST_STATUS)</command>
<levels>
<level>extended</level>
Expand All @@ -89,9 +83,7 @@
<variations>
<variation>NoOptions</variation>
</variations>
<command>$(GEN_JTB_GENERIC) tests=api/javax_tools testsuite=COMPILER; \
$(EXEC_COMPILER_TEST); \
$(GEN_SUMMARY_GENERIC) tests=api/javax_tools testsuite=COMPILER; \
<command>$(JCK_CMD_TEMPLATE) tests=api/javax_tools testsuite=COMPILER; \
$(TEST_STATUS)</command>
<levels>
<level>sanity</level>
Expand All @@ -113,9 +105,7 @@
<variations>
<variation>NoOptions</variation>
</variations>
<command>$(GEN_JTB_GENERIC) tests=api/signaturetest testsuite=COMPILER; \
$(EXEC_COMPILER_TEST); \
$(GEN_SUMMARY_GENERIC) tests=api/signaturetest testsuite=COMPILER; \
<command>$(JCK_CMD_TEMPLATE) tests=api/signaturetest testsuite=COMPILER; \
$(TEST_STATUS)</command>
<levels>
<level>sanity</level>
Expand Down
Loading

0 comments on commit 3f424ad

Please sign in to comment.