Here's the log which was not added to the repository because I accidentally
typed "c" at the "a)bort, c)ontinue, e)dit" svn commit prompt.

- Show user where the perfbase HTTP POST is going in host:port/dir
  format.
- env_proxy => 1 is unreliable. Look for the proxy in the user's env and
  explicitly set it for the UserAgent
- Allow for sending data to perfbase _and_ output to perfbase debug
  files (before it had to be one or the other). Note: to turn off
  uploading test results to perfbase, set perfbase_url to an invalid
  url
- Adjusted some MTT defaults
- Some typos fixed

-Ethan


em162...@osl.iu.edu wrote On 07/14/06 11:47,:
> Author: em162155
> Date: 2006-07-14 11:46:44 -0400 (Fri, 14 Jul 2006)
> New Revision: 196
> 
> Modified:
>    trunk/lib/MTT/Defaults.pm
>    trunk/lib/MTT/Reporter/Perfbase.pm
>    trunk/server/mtt_config.php.perfbase.sample
>    trunk/server/perfbase.php
> Log:
> 
> 
> Modified: trunk/lib/MTT/Defaults.pm
> ===================================================================
> --- trunk/lib/MTT/Defaults.pm 2006-07-11 16:42:27 UTC (rev 195)
> +++ trunk/lib/MTT/Defaults.pm 2006-07-14 15:46:44 UTC (rev 196)
> @@ -25,7 +25,7 @@
>  
>      http_agents => "wget lynx curl",
>  
> -    known_compiler_names => "gnu pgi intel kai absoft pathscale none",
> +    known_compiler_names => "gnu pgi intel kai absoft pathscale sun none",
>  };
>  
>  # User-defined configuration
> @@ -60,7 +60,7 @@
>  
>  # Test run phase
>  our $Test_run = {
> -    perfbase_xml => "inp_test_run.xml",
> +    perfbase_xml => "inp_test_run_correctness.xml",
>      argv => "",
>      np => 2,
>      np_ok => 1,
> 
> Modified: trunk/lib/MTT/Reporter/Perfbase.pm
> ===================================================================
> --- trunk/lib/MTT/Reporter/Perfbase.pm        2006-07-11 16:42:27 UTC (rev 
> 195)
> +++ trunk/lib/MTT/Reporter/Perfbase.pm        2006-07-14 15:46:44 UTC (rev 
> 196)
> @@ -3,6 +3,7 @@
>  # Copyright (c) 2005-2006 The Trustees of Indiana University.
>  #                         All rights reserved.
>  # Copyright (c) 2006      Cisco Systems, Inc.  All rights reserved.
> +# Copyright (c) 2006      Sun Microsystems, Inc.  All rights reserved.
>  # $COPYRIGHT$
>  # 
>  # Additional copyrights may follow
> @@ -25,6 +26,7 @@
>  my $password;
>  my $realm;
>  my $url;
> +my $port;
>  
>  # platform common name
>  my $platform;
> @@ -58,7 +60,7 @@
>      ++$count if ($password);
>      ++$count if ($realm);
>      if ($count > 0 && $count != 3) {
> -        Warning("Perfbase Reporter section [$section]: if password, 
> username, or relam is specified, they all must be specified.\n");
> +        Warning("Perfbase Reporter section [$section]: if password, 
> username, or realm is specified, they all must be specified.\n");
>          return undef;
>      }
>      $platform = Value($ini, $section, "perfbase_platform");
> @@ -66,24 +68,40 @@
>      # Extract the host and port from the URL.  Needed for the
>      # credentials section.
>  
> -    my $port;
> +    my $dir;
>      my $host = $url;
> -    if ($host =~ /http:\/\/([-a-zA-Z0-9.]+):(\d+)/) {
> +    if ($host =~ /(http:\/\/[-a-zA-Z0-9.]+):(\d+)\/(.*)$/) {
>          $host = $1;
>          $port = $2;
> -    } elsif ($host =~ /http:\/\/([-a-zA-Z0-9.]+)/) {
> +        $dir = $3;
> +    } elsif ($host =~ /(http:\/\/[-a-zA-Z0-9.]+)\/(.*)$/) {
>          $host = $1;
> +        $dir = $2;
>          $port = 80;
> -    } elsif ($host =~ /https:\/\/([-a-zA-Z0-9.]+)/) {
> +    } elsif ($host =~ /(https:\/\/[-a-zA-Z0-9.]+)\/(.*)$/) {
>          $host = $1;
> +        $dir = $2;
>          $port = 443;
>      } else {
>          return undef;
>      }
> +    $url = "$host:$port/$dir";
>  
> +    # Look for the proxy server in the environment,
> +    # and take the first one we find
> +    my $proxy;
> +    foreach my $p (grep(/http_proxy/i, keys %ENV)) {
> +        if ($ENV{$p}) {
> +            $proxy = $ENV{$p};
> +            $proxy = "http://$proxy"; if ($proxy !~ /https?:/);
> +            last;
> +        }
> +    }
> +
>      # Create the Perl LWP stuff to setup for HTTP PUT's later
>  
> -    $ua = LWP::UserAgent->new({ env_proxy => 1 });
> +    $ua = LWP::UserAgent->new();
> +    $ua->proxy(['http', 'ftp'], $proxy);
>      $ua->agent("MPI Test Perfbase Reporter");
>      if ($realm && $username && $password) {
>          Verbose("   Set HTTP credentials for realm \"$realm\"\n");
> @@ -186,10 +204,10 @@
>                          PBXML => $xml,
>                      };
>                      
> -                    if (0 && !$debug_filename) {
> +                    if ($url) {
>                          # Do the post and get the response.
>                          
> -                        Debug("Submitting to perbase...\n");
> +                        Debug("Submitting to perfbase...\n");
>                          my $response = $ua->post($url, $form);
>                          if ($response->is_success()) {
>                              ++$successes;
> @@ -199,7 +217,9 @@
>                                      $response->status_line . "\n" . 
> $response->content);
>                          }
>                          Debug("Perfbase submit complete\n");
> -                    } else {
> +                    }
> +
> +                    if ($debug_filename) {
>                          # Write out what we *would* have sent via HTTP to a
>                          # file
>                          
> @@ -212,7 +232,7 @@
>                          Debug("Debug perfbase file write complete\n");
>  
>                          ++$successes;
> -                        push(@success_outputs, "Wrote to file $f");
> +                        push(@success_outputs, "Wrote to file $f\n");
>                      }
>                  } else {
>                      Warning("No perfbase_xml field in the INI specification; 
> skipping perfbase reporting!\n");
> @@ -223,7 +243,7 @@
>  
>      if ($successes > 0) {
>          if ($fails == 0) {
> -            Verbose(">> Reported $successes outputs to perfbase\n");
> +            Verbose(">> Reported $successes output(s) to perfbase\n");
>              Debug(@success_outputs);
>          }
>      }
> 
> Modified: trunk/server/mtt_config.php.perfbase.sample
> ===================================================================
> --- trunk/server/mtt_config.php.perfbase.sample       2006-07-11 16:42:27 UTC 
> (rev 195)
> +++ trunk/server/mtt_config.php.perfbase.sample       2006-07-14 15:46:44 UTC 
> (rev 196)
> @@ -9,17 +9,17 @@
>  # $HEADER$
>  #
>  
> -$local = "/u/jsquyres/perfbase";
> +$local = $_ENV[HOME];
>  
>  $mtt_pb_config = array
>  (
>    env => array
>    (
> -    PATH => "$local:/opt/python-2.4/bin:" . $_ENV[PATH],
> +    PATH => "$local:/opt/python-2.4/bin:/opt/perfbase-0.9.1/bin:" . 
> $_ENV[PATH],
>      PYTHONPATH => "$local/lib/python2.4:$local/lib/python2.4/site-packages" 
> . (isset($_ENV[PYTHONPATH]) ? ":$_ENV[PYTHONPATH]" : ""),
>      PB_DBUSER => "postgres",
>      PB_DBPASSWD => "insert password here",
>      ),
> -  cwd => "/tmp",
> +  cwd => ".",
>    debug => 1,
>    );
> 
> Modified: trunk/server/perfbase.php
> ===================================================================
> --- trunk/server/perfbase.php 2006-07-11 16:42:27 UTC (rev 195)
> +++ trunk/server/perfbase.php 2006-07-14 15:46:44 UTC (rev 196)
> @@ -156,7 +156,7 @@
>  $status = proc_close($process);
>  if (0 != $status) {
>      mtt_error("501 Perfbase exited with error",
> -              "Perfbase returned with exit status $status.  Its output 
> was:\n$output");
> +              "Perfbase returned with exit status $status.  Its output 
> was:\n$output\n");
>  } else {
>      mtt_debug("perfbase input: succeeded\n$output\n");
>  }
> 
> _______________________________________________
> mtt-svn mailing list
> mtt-...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/mtt-svn

Reply via email to