summaryrefslogtreecommitdiff
path: root/CIAO/performance-tests
diff options
context:
space:
mode:
authormsmit <msmit@remedy.nl>2009-12-11 10:50:47 +0000
committermsmit <msmit@remedy.nl>2009-12-11 10:50:47 +0000
commite0356eb28d671b80f90e160604b8aaf457cd3ee0 (patch)
treec08a0a81131a66f2dfd91f1392befdaabe56f730 /CIAO/performance-tests
parent113acb991a40c8c5b3cb0d99d58e87b4cf898d52 (diff)
downloadATCD-e0356eb28d671b80f90e160604b8aaf457cd3ee0.tar.gz
Fri Dec 11 10:52:33 UTC 2009 Marcel Smit <msmit@remedy.nl>
* performance-tests/Benchmark/Multi_Threaded/run_test.pl: * performance-tests/Benchmark/RoundTrip/run_test.pl: Resolved fuzz errors/warnings
Diffstat (limited to 'CIAO/performance-tests')
-rwxr-xr-xCIAO/performance-tests/Benchmark/Multi_Threaded/run_test.pl42
-rwxr-xr-xCIAO/performance-tests/Benchmark/RoundTrip/run_test.pl58
2 files changed, 58 insertions, 42 deletions
diff --git a/CIAO/performance-tests/Benchmark/Multi_Threaded/run_test.pl b/CIAO/performance-tests/Benchmark/Multi_Threaded/run_test.pl
index f7d028a6cc8..5c31666c186 100755
--- a/CIAO/performance-tests/Benchmark/Multi_Threaded/run_test.pl
+++ b/CIAO/performance-tests/Benchmark/Multi_Threaded/run_test.pl
@@ -10,17 +10,22 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
#
use lib "$ENV{'ACE_ROOT'}/bin";
-use PerlACE::Run_Test;
+use PerlACE::TestTarget;
$status = 0;
-$daemon_ior = PerlACE::LocalFile ("daemon.ior");
-$am_ior = PerlACE::LocalFile ("am.ior");
-$ACE_ROOT=$ENV{'ACE_ROOT'};
+$daemon_base = "daemon.ior";
+$am_base = "am.ior";
+
+$tg = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n";
+
+$daemon_ior = $tg->LocalFile ($daemon_base);
+$am_ior = $tg->LocalFile ($am_base);
+
$CIAO_ROOT=$ENV{'CIAO_ROOT'};
-unlink $daemon_ior;
-unlink $am_ior;
+$tg->DeleteFile ($daemon_base);
+$tg->DeleteFile ($am_base);
# CIAO Daemon command line arguments
$daemon_args = "-c $CIAO_ROOT/tools/ComponentServer/svc.conf -ORBEndpoint iiop://localhost:10000 -o $daemon_ior -i CIAO_Installation_Data.ini -n $CIAO_ROOT/tools/ComponentServer/ComponentServer";
@@ -33,47 +38,50 @@ $assembly_manager_args = "-o $am_ior -c test.dat";
$ad_args = " -k file://$am_ior -a Multi_Threaded.cad";
# CIAO daemon process definition
-$DS = new PerlACE::Process ("$CIAO_ROOT/tools/Daemon/CIAO_Daemon",
+$DS = $tg->CreateProcess ("$CIAO_ROOT/tools/Daemon/CIAO_Daemon",
"$daemon_args");
## Starting up the CIAO daemon
$DS->Spawn ();
-if (PerlACE::waitforfile_timed ($daemon_ior, $PerlACE::wait_interval_for_process_creation) == -1) {
+if ($tg->WaitForFileTimed($daemon_base,
+ $tg->ProcessStartWaitInterval ()) == -1) {
print STDERR "ERROR: Could not find daemon ior file <$daemon_ior>\n";
$DS->Kill ();
exit 1;
}
# CIAO daemon process definition
-$DS2 = new PerlACE::Process ("$CIAO_ROOT/tools/Daemon/CIAO_Daemon",
+$DS2 = $tg->CreateProcess ("$CIAO_ROOT/tools/Daemon/CIAO_Daemon",
"$daemon_args2");
## Starting up the CIAO daemon
$DS2->Spawn ();
-if (PerlACE::waitforfile_timed ($daemon_ior, $PerlACE::wait_interval_for_process_creation) == -1) {
+if ($tg->WaitForFileTimed($daemon_base,
+ $tg->ProcessStartWaitInterval ()) == -1) {
print STDERR "ERROR: Could not find daemon ior file <$daemon_ior>\n";
$DS->Kill ();
exit 1;
}
-$AM = new PerlACE::Process("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Manager",
+$AM = $tg->CreateProcess ("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Manager",
$assembly_manager_args);
$AM->Spawn ();
-if (PerlACE::waitforfile_timed ($am_ior, $PerlACE::wait_interval_for_process_creation) == -1) {
+if ($tg->WaitForFileTimed($am_base,
+ $tg->ProcessStartWaitInterval ()) == -1) {
print STDERR "ERROR: Could not find assembly ior file <$am_ior>\n";
$AM->Kill ();
exit 1;
}
-$AD = new PerlACE::Process("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Deployer",
+$AD = $tg->CreateProcess ("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Deployer",
$ad_args);
$AD->Spawn ();
sleep (5);
#Start the client to send the trigger message
-$CL = new PerlACE::Process ("../Multi_Threaded/client", "");
-$CL->SpawnWaitKill(60);
+$CL = $tg->CreateProcess ("../Multi_Threaded/client", "");
+$CL->SpawnWaitKill($tg->ProcessStopWaitInterval ());
$AM->Kill ();
$AD->Kill ();
@@ -81,7 +89,7 @@ $DS->Kill ();
$CL->Kill ();
$DS2->Kill ();
-unlink $daemon_ior;
-unlink $am_ior;
+$tg->DeleteFile ($daemon_base);
+$tg->DeleteFile ($am_base);
exit $status;
diff --git a/CIAO/performance-tests/Benchmark/RoundTrip/run_test.pl b/CIAO/performance-tests/Benchmark/RoundTrip/run_test.pl
index cb2c98e1a75..0364d8b16a4 100755
--- a/CIAO/performance-tests/Benchmark/RoundTrip/run_test.pl
+++ b/CIAO/performance-tests/Benchmark/RoundTrip/run_test.pl
@@ -10,19 +10,25 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
#
use lib "$ENV{'ACE_ROOT'}/bin";
-use PerlACE::Run_Test;
+use PerlACE::TestTarget;
$status = 0;
-$daemon_ior = PerlACE::LocalFile ("daemon.ior");
-$svr_ior = PerlACE::LocalFile ("server.ior");
-$home_ior = PerlACE::LocalFile ("test.ior");
-$ACE_ROOT=$ENV{'ACE_ROOT'};
+$daemon_base = "daemon.ior";
+$svr_base = "server.ior";
+$home_base = "test.ior";
+
+$tg = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n";
+
+$daemon_ior = $tg->LocalFile ($daemon_base);
+$svr_ior = $tg->LocalFile ($svr_base);
+$home_ior = $tg->LocalFile ($home_base);
+
$CIAO_ROOT=$ENV{'CIAO_ROOT'};
-unlink $daemon_ior;
-unlink $svr_ior;
-unlink $home_ior;
+$tg->DeleteFile ($daemon_base);
+$tg->DeleteFile ($svr_base);
+$tg->DeleteFile ($home_base);
# CIAO Daemon command line arguments
$daemon_args = "-c ../RoundTrip/svc.conf -o $daemon_ior -i CIAO_Installation_Data.ini -n $CIAO_ROOT/tools/ComponentServer/ComponentServer";
@@ -46,33 +52,35 @@ $shutdown_args = "shutdown";
$cl_args = "-ORBSvcConf ../RoundTrip/svc.conf -i 300000";
# CIAO daemon process definition
-$DS = new PerlACE::Process ("$CIAO_ROOT/tools/Daemon/CIAO_Daemon",
+$DS = $tg->CreateProcess ("$CIAO_ROOT/tools/Daemon/CIAO_Daemon",
"$daemon_args");
# Client process definition
-$CL = new PerlACE::Process ("../RoundTrip/client",
+$CL = $tg->CreateProcess ("../RoundTrip/client",
$cl_args);
## Starting up the CIAO daemon
$DS->Spawn ();
-if (PerlACE::waitforfile_timed ($daemon_ior, $PerlACE::wait_interval_for_process_creation) == -1) {
+if ($tg->WaitForFileTimed($daemon_base,
+ $tg->ProcessStartWaitInterval ()) == -1) {
print STDERR "ERROR: Could not find daemon ior file <$daemon_ior>\n";
$DS->Kill ();
exit 1;
}
## Starting up a ComponentServer running the Roundtrip home.
-$DC = new PerlACE::Process ("$controller",
- "$common_args $start_args");
+$DC = $tg->CreateProcess ("$controller",
+ "$common_args $start_args");
-$DC->SpawnWaitKill (60);
-if (PerlACE::waitforfile_timed ($home_ior, $PerlACE::wait_interval_for_process_creation) == -1) {
+$DC->SpawnWaitKill ($tg->ProcessStopWaitInterval ());
+if ($tg->WaitForFileTimed($home_base,
+ $tg->ProcessStartWaitInterval ()) == -1) {
print STDERR "ERROR: Could not find home ior file <$home_ior>\n";
$DS->Kill ();
exit 1;
}
-$client = $CL->SpawnWaitKill (60);
+$client = $CL->SpawnWaitKill ($tg->ProcessStopWaitInterval ());
if ($client != 0) {
print STDERR "ERROR: client returned $client\n";
@@ -80,10 +88,10 @@ if ($client != 0) {
}
## Terminating the ComponentServer running.
-$DC = new PerlACE::Process ("$controller",
+$DC = $tg->CreateProcess ("$controller",
"$common_args $end_args");
-$ctrl = $DC->SpawnWaitKill (60);
+$ctrl = $DC->SpawnWaitKill ($tg->ProcessStopWaitInterval ());
if ($ctrl != 0) {
print STDERR "ERROR: Fail to end component server\n";
$DC->Kill ();
@@ -91,25 +99,25 @@ if ($ctrl != 0) {
}
## Terminating the ComponentServer running the RateGen home.
-$DC = new PerlACE::Process ("$controller",
- "$common_args $shutdown_args");
+$DC = $tg->CreateProcess ("$controller",
+ "$common_args $shutdown_args");
-$ctrl = $DC->SpawnWaitKill (60);
+$ctrl = $DC->SpawnWaitKill ($tg->ProcessStopWaitInterval ());
if ($ctrl != 0) {
print STDERR "ERROR: Fail to shutdown CIAODaemon\n";
$DS->Kill ();
exit 1;
}
-$ctrl = $DS->WaitKill (60);
+$ctrl = $DS->WaitKill ($tg->ProcessStopWaitInterval ());
if ($ctrl != 0) {
print STDERR "ERROR: CIAODaemon didn't shutdown gracefully $ctrl\n";
$DS->Kill ();
exit 1;
}
-unlink $daemon_ior;
-unlink $svr_ior;
-unlink $home_ior;
+$tg->DeleteFile ($daemon_base);
+$tg->DeleteFile ($svr_base);
+$tg->DeleteFile ($home_base);
exit $status;