Folks,
I have received a ton of useful info from the list.. a great deal of it of
late has gone to help me with my current project to automate (somewhat) a
testing procedure.
I have finally made my way to the final stage of the script.. execution of
the test.. I have the following (be for warned it is POS/FUGLY code!!! ) sub
that needs to be cleaned up. I am not to sure on how todo this... I have
ideas etc.. but would like info as to a cleaner more professional way.
sub doSLT () {
###
###
### Parse the @scrfiles array, replaceing _SID_
### with the user supplied SID
###
###
local ($^I, @ARGV) = (".bak", @scrfiles);
while(<>) {
s/_SID_\E/$db_name/g;
print;
}
###
### This is FUGLY! still looking into a better way to achive our
goal here
### That is to gracefuly kick off the required tasks of a SLT
###
# system("../scripts/ClientDiag.pl", $run_num,
$g_diag_sleep);
if ( $ALL_ONLY && $type ) { ### If we want to
run a ALL sleepystart
# system (nohup, $g_acf2_file, $eng_server,
$g_all_sleepy, $num_clients, $g_all_cl_start, $g_all_cl_think,
$g_all_cl_stagger);
} elsif ( $ALL_ONLY && !$type ) { ### If we want to
run a ALL faststart
# system (nohup, $g_acf2_file, $eng_server,
$g_all_fast, $num_clients, $g_all_cl_start, $g_all_cl_think,
$g_all_cl_stagger);
} elsif ( $PASS_RUN ) { ### This is a
Password/Login run
&printNotice ("nohup $g_acf2_file $eng_server
$g_logpass $num_clients $client_start 2 2\n");
} elsif ( $type ) { ### FULL sleepystart
SLT run
&printNotice ("nohup $g_acf2_file $eng_server
$g_all_sleepy $num_clients $g_all_cl_start $g_all_cl_think
$g_all_cl_stagger\n");
&printNotice ("nohup $g_acf2_file $eng_server
$g_p299_sleepy $g_p299_cl $g_p299_cl_start $g_p299_cl_think
$g_p299_cl_stagger\n");
&printNotice ("nohup $g_acf2_file $eng_server
$g_p5_sleepy $g_p5_cl $g_p5_cl_start $g_p5_cl_think $g_p5_cl_stagger\n");
&printNotice ("nohup $g_acf2_file $eng_server
$g_imp143_sleepy $g_imp143_cl $g_imp143_cl_start $g_imp143_cl_think
$g_imp143_cl_stagger\n");
&printNotice ("nohup $g_acf2_file $eng_server
$g_imp5_sleepy $g_imp5_cl $g_imp5_cl_start $g_imp5_cl_think
$g_imp5_cl_stagger\n");
&printNotice ("nohup $g_acf2_file $eng_server
$g_imp14_sleepy $g_imp14_cl $g_imp14_cl_start $g_imp14_cl_think
$g_imp14_cl_stagger\n");
&printNotice ("nohup $g_acf2_file $eng_server
$g_val_sleepy $g_val_cl $g_val_cl_start $g_val_cl_think
$g_val_cl_stagger\n");
} elsif ( !$type ) { ### FULL fastart SLT
run
&printNotice ("nohup $g_acf2_file $eng_server
$g_all_fast $num_clients $g_all_cl_start $g_all_cl_think
$g_all_cl_stagger\n");
&printNotice ("nohup $g_acf2_file $eng_server
$g_p5_fast $g_p5_cl $g_p5_cl_start $g_p5_cl_think $g_p5_cl_stagger\n");
&printNotice ("nohup $g_acf2_file $eng_server
$g_p299_fast $g_p299_cl $g_p299_cl_start $g_p299_cl_think
$g_p299_cl_stagger\n");
&printNotice ("nohup $g_acf2_file $eng_server
$g_imp143_fast $g_imp143_cl $g_imp143_cl_start $g_imp143_cl_think
$g_imp143_cl_stagger\n");
&printNotice ("nohup $g_acf2_file $eng_server
$g_imp14_fast $g_imp14_cl $g_imp14_cl_start $g_imp14_cl_think
$g_imp14_cl_stagger\n");
&printNotice ("nohup $g_acf2_file $eng_server
$g_imp5_fast $g_imp5_cl $g_imp5_cl_start $g_imp5_cl_think
$g_imp5_cl_stagger\n");
&printNotice ("nohup $g_acf2_file $eng_server
$g_val_fast $g_val_cl $g_val_cl_start $g_val_cl_think $g_val_cl_stagger\n");
}
}
I was thinking of hashing it and then for() it .... but was unsure how I
could put a single key in the hash that represented a signgle test...
IE:
key => nohup $g_acf2_file $eng_server $g_val_fast $g_val_cl $g_val_cl_start
$g_val_cl_think $g_val_cl_stagger\n
-Ron
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]