On Tue, 23 Dec 2003, drieux wrote:

> 
> On Dec 23, 2003, at 9:03 AM, [EMAIL PROTECTED] wrote:
> [..]
> > Sorry for the curt thank you. You code looks really good.
> 
> I'd never thought of it that way. What I think might
> be the elegant way of saying 'thank you' to folks who
> offer an idea/code/suggestion/BriefPsychoticEpisode would
> be something on the order of
> 
>       a. demonstrating what one had 'learned' from the code, idea, ....
>       b. being able to help others with what one learned to others.
> 
> Often times folks don't have the time, due to the press
> of what ever it was that got them tossing a 'current issue'
> into play...
> 
> > On Mon, 22 Dec 2003, drieux wrote:
> >> On Dec 22, 2003, at 4:32 PM, [EMAIL PROTECTED] wrote:
> [..]
> >>
> >> So you might try the idea of
> >>
> >>    my ($line1, $line2 , $flag );
> >>    while ( 1 ) {
> >>            $line1 = <TESTFILE>; # read them each
> >>            $line2 = <LOGFILE>;
> >
> > never thought of reading two files one line at a time like this,
> > looks so easy once you showed me.
> 
> the gooder news is that it 'solves' the problem
> you asked about - the information is that it is
> still not clear which way you really want to go.
> 
> you might check out MJD's 'diff' in perl:
> <http://www.perl.com/language/ppt/src/diff/diff.mjd>
> 
> >
> >>            last unless ( $line1 || $line2 ); # if both empty exit loop
> >>            #
> >>            # otherwise test for which one just finished
> >>            #
> >>            unless( $line1 )
> >>            {
> >>                    $flag = 1;
> >>                    last;
> >>            }
> >>            unless( $line2 )
> >>            {
> >>                    $flag = 2;
> >>                    last
> >>            }
> > a much better line check then the "junk" I wrote.
> 
> actually upon reflection I thought
> 
>       $flag = 1 unless( $line1 );
>       $flag = 2 unless( $line2 );
>       last if $flag;
> 
> would solve that part - but had it fanned out
> in case you wanted to do something specific with
> either case....
> 
> The trade offs are basically simple:
> 
>       a. slurp in both files using a common slurper function
>               then call a compare_slurpie()
> 
>       b. find a neater data model that will allow you to
>               parse the files for the information you need, write
>               one grot_data_from_file() method, call it twice and
>               then a compare_grotted_data()
> 
>       c. pass in two file_names and grovel in parrallel as is
>               line by line...
> [..]
> 
> ciao
> drieux
> 
> ---
> 
> 
> 

Not really sure as to the final use of the code. I have a perl script I 
wrote back in Sept that opens a file, reads the file and runs a list of 
tests to do regression testing on LA-MPI (Los Alamos MPI). Currently I 
have a "kill" timer that runs during each test and kills the running test 
if it has a timeout. What I'm looking at is changing the timer depending 
on the test. Sounds simple enough, but I dont want to have to go in and modify 
the regression test list, it's almost 500 tests, and can change with 
each run. 

One of the issues is that I sometimes have to contend with other users on 
the system, so tests time out, even if they are running fine.. Was 
thinking along the lines of opening the tests file and also a stored time_to_run_tests 
file, double the value in 
the time_to_run_tests, and us it as the timeout value. However there may 
be times when there are not any time_to_run_tests files to use..

So I'm just figuring it out as I go, and asking dumb questions..

Thanks

Denis 

 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to