-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
Start/stop agent with every vm/jdwp test #6044
base: master
Are you sure you want to change the base?
Changes from 1 commit
ab417f6
311c6f7
7781d2d
8bcab8b
06dca50
1945a68
a2600b5
cf3b509
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
jckAgentPID=0 | ||
harnessExitCode=0 | ||
tnameservPID=0 | ||
|
||
startJCKAgent() { | ||
echo "Starting JCK agent.." | ||
eval $1 | ||
jckAgentPID=$! | ||
echo "Agent started with PID $jckAgentPID" | ||
} | ||
|
||
stopJCKAgent() { | ||
echo "Test complete. Stopping JCK Agent.." | ||
kill -9 $jckAgentPID | ||
} | ||
|
||
startTNameServ() { | ||
echo "Starting TNAMESERV.." | ||
eval $1 | ||
tnameservPID=$! | ||
echo "TNAMESERV started with PID $tnameservPID" | ||
} | ||
|
||
startJCKHarness() { | ||
echo "Starting JCK harness.." | ||
eval $1; return $? | ||
} | ||
|
||
stopTNameServ() { | ||
echo "Stopping TNAMESERV.." | ||
kill -9 $tnameservPID | ||
} | ||
|
||
# Query all of the tests in $(JCK_ROOT)/JCK-runtime-$(JCK_VERSION_NUMBER)/tests/vm/jdwp/ | ||
find $4 -type f -name "*.java" | while read -r test; | ||
do | ||
startJCKAgent | ||
# cp generated.jtb temp_jdwp.jtb | ||
# Replace tests=vm/jdwp line with tests=<TEST_CASE> | ||
# Not sure what to do here ^^ | ||
startTNameServ "$2" | ||
startJCKHarness "$3" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to have a hard process timeout on the testcase run in case it hangs... as we know the jtharness does not time it out...
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also you will need to keep the worst harnessExitCode, to exit the whole jdwp loop with a non-0 rc if one or more fails... |
||
harnessExitCode=$? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also another complication, we need to report the status report after each jdwp testcase otherwise it will be overwritten, we could try merging the report.xml's but not sure that will work...
|
||
stopTNameServ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for start/stopTNameServ |
||
stopJCKAgent | ||
done |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,6 +174,7 @@ EXEC_RUNTIME_TEST = $(JAVA_TO_TEST) -jar $(JCK_ROOT)/JCK-runtime-$(JCK_VERSION_N | |
EXEC_COMPILER_TEST = $(JAVA_TO_TEST) -jar $(JCK_ROOT)/JCK-compiler-$(JCK_VERSION_NUMBER)/lib/javatest.jar -config $(CONFIG_ALT_PATH)/$(JCK_VERSION)/compiler.jti @$(REPORTDIR)/generated.jtb | ||
EXEC_DEVTOOLS_TEST = $(JAVA_TO_TEST) -jar $(JCK_ROOT)/JCK-devtools-$(JCK_VERSION_NUMBER)/lib/javatest.jar -config $(CONFIG_ALT_PATH)/$(JCK_VERSION)/devtools.jti @$(REPORTDIR)/generated.jtb | ||
EXEC_RUNTIME_TEST_WITH_AGENT = $(TEST_ROOT)/jck/agent-drive.sh '$(START_AGENT_GENERIC)' '$(EXEC_RUNTIME_TEST)' | ||
EXEC_RUNTIME_TEST_JDWP = $(TEST_ROOT)/jck/jck-jdwp-test-drive.sh '$(START_AGENT_GENERIC)' '$(EXEC_RUNTIME_TEST)' '$(JCK_ROOT)/JCK-runtime-$(JCK_VERSION_NUMBER)/tests/vm/jdwp/' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will need to separate @$(REPORTDIR)/generated.jtb from '$('$(EXEC_RUNTIME_TEST)')' |
||
EXEC_RUNTIME_TEST_WITH_RMI_SERVICES = $(EXEC_RUNTIME_TEST_WITH_AGENT) | ||
|
||
ifeq ($(JDK_VERSION), 8) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EXEC_RUNTIME_TEST will contain @$(REPORTDIR)/generated.jtb
you will need to probably use a new EXEC_RUNTIME_TEST_JDWP that does not have @$(REPORTDIR)/generated.jtb, and pass the generated.jtb as another param to this script... then use that as the basis of the cp generated.jtb...
then add the temp.jtb to the end of each EXEC... ie.