[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make 3.81 MinGW port and testsuite working with MSYS

From: Paul D. Smith
Subject: Re: make 3.81 MinGW port and testsuite working with MSYS
Date: Mon, 28 Feb 2005 17:57:02 -0500

%% "J. Grant" <address@hidden> writes:

  jg> (cvs update is not working for me at present on the CVS, so I
  jg> cannot see your test script changes Paul.)

I think it would be best if folks postponed more discussion until after
they've examined my changes; basically I left the
run_command_with_output sub the way it was before (using
attach/detach_default_output) and instead modified the compare sub, like

sub compare_output
  local($answer,$logfile) = @_;
  local($slurp, $answer_matched) = ('', 0);

  print "Comparing Output ........ " if $debug;

  $slurp = &read_file_into_string ($logfile);

  # For make, get rid of any time skew error before comparing--too bad this
  # has to go into the "generic" driver code :-/
  $slurp =~ s/^.*modification time .*in the future.*\n//gm;
  $slurp =~ s/^.*Clock skew detected.*\n//gm;


  if ($slurp eq $answer) {
    $answer_matched = 1;
  } else {
    # See if it is a slash or CRLF problem
    local ($answer_mod) = $answer;

    $answer_mod =~ tr,\\,/,;
    $answer_mod =~ s,\r\n,\n,gs;

    $slurp =~ tr,\\,/,;
    $slurp =~ s,\r\n,\n,gs;

    $answer_matched = ($slurp eq $answer_mod);

  if ($answer_matched && $test_passed)
    print "ok\n" if $debug;
    return 1;

  if (! $answer_matched) {
    print "DIFFERENT OUTPUT\n" if $debug;

    &create_file (&get_basefile, $answer);

    print "\nCreating Difference File ...\n" if $debug;

    # Create the difference file

    local($command) = "diff -c " . &get_basefile . " " . $logfile;

  $suite_passed = 0;
  return 0;

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

[Prev in Thread] Current Thread [Next in Thread]