-
-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mesbah Alam <Mesbah_Alam@ca.ibm.com>
- Loading branch information
1 parent
4b70649
commit 71248e5
Showing
14 changed files
with
783 additions
and
388 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,84 @@ | ||
#!/bin/bash | ||
#!/bin/bash -ue | ||
|
||
echo "Starting JCK agent.." | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.