Changeset 716

Show
Ignore:
Timestamp:
07/20/07 16:44:52 (1 year ago)
Author:
kindlund
Message:

Improved namespace support.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/branches/exp/kindlund-firefox/bin/StartManager.pl

    r709 r716  
    2424# They can however supply multiple urls which will be processed in order 
    2525 
    26 # Change to 'Browser::IE' or 'Browser::FF' 
    27 my $driver = "Browser::IE"; 
     26# Change to 'HoneyClient::Agent::Driver::Browser::IE' or 
     27#           'HoneyClient::Agent::Driver::Browser::FF' 
     28my $driver = "HoneyClient::Agent::Driver::Browser::IE"; 
    2829my $config = "/vm/master-vms/Agent.Master-23/winXPPro.cfg"; 
    2930my $maxrel = 10; 
  • honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent.pm

    r715 r716  
    113113    # TODO: Eventually, make this more dynamic, based upon the presence of HoneyClient::Agent::Driver::* elements 
    114114    # within the global configuration file.  Or, feed the initialization logic through init() as part of the arguments. 
    115     @DRIVERS = ( 'Browser::IE' ); 
     115    #@DRIVERS = ( 'HoneyClient::Agent::Driver::Browser::IE', 'HoneyClient::Agent::Driver::Browser::FF' ); 
     116    @DRIVERS = ( 'HoneyClient::Agent::Driver::Browser::IE' ); 
    116117    foreach (@DRIVERS) { 
    117         eval "use HoneyClient::Agent::Driver::$_"; 
     118        eval "use $_"; 
    118119        if ($@) { 
    119120            Carp::croak "$@"; 
     
    150151use HoneyClient::Util::Config qw(getVar); 
    151152 
     153# TODO: Include FF 
    152154# Make sure HoneyClient::Agent::Driver::Browser::IE loads. 
    153155BEGIN { use_ok('HoneyClient::Agent::Driver::Browser::IE') or diag("Can't load HoneyClient::Agent::Driver::Browser::IE package.  Check to make sure the package library is correctly listed within the path."); } 
     
    598600    # Figure out the corresponding driver name. 
    599601    my $driverName = ref($driver); 
    600     $driverName =~ s/HoneyClient::Agent::Driver:://g; 
    601602 
    602603    # Extract the corresponding queue. 
     
    691692    my ($class, %args) = @_; 
    692693 
    693     # XXX: Change this to debug, eventually. 
    694694    # Log resolved arguments. 
    695     $LOG->info(sub { 
     695    $LOG->debug(sub { 
    696696        # Make Dumper format more terse. 
    697697        $Data::Dumper::Terse = 1; 
     
    732732 
    733733# XXX: Delete this, eventually. 
    734 print $driverName . ": Checking TID = " . Dumper($tid) . "\n"; 
     734print $driverName . " - Checking TID = " . Dumper($tid) . "\n"; 
    735735if (defined(threads->object($tid))) { 
    736     print $driverName . ": Thread defined.\n"; 
     736    print $driverName . " - Thread defined.\n"; 
    737737    if (threads->object($tid)->is_running()) { 
    738         print $driverName . ": Thread is running.\n"; 
     738        print $driverName . " - Thread is running.\n"; 
    739739    } else { 
    740         print $driverName . ": Thread is NOT running.\n"; 
     740        print $driverName . " - Thread is NOT running.\n"; 
    741741    } 
    742742} else { 
    743     print $driverName . ": Thread NOT defined.\n"; 
     743    print $driverName . " - Thread NOT defined.\n"; 
    744744} 
    745745         
     
    756756        } else { 
    757757            # XXX: Remove this, eventually. 
    758             print $driverName . ": Creating a new run() child thread...\n"; 
     758            print $driverName . " - Creating a new run() child thread...\n"; 
    759759        } 
    760760 
     
    790790        if ($thread->is_running()) { 
    791791            # XXX: Debugging, remove eventually.  
    792             print $driverName . ": Thread ID = " . $thread->tid() . "\n"; 
     792            print $driverName . " - Thread ID = " . $thread->tid() . "\n"; 
    793793        } else { 
    794794            # XXX: Debugging, remove eventually.  
    795             print $driverName . ": Thread ID = " . $thread->tid() . " (NOT RUNNING)\n"; 
     795            print $driverName . " - Thread ID = " . $thread->tid() . " (NOT RUNNING)\n"; 
    796796        } 
    797797 
     
    855855        # Now, initialize each driver object.  
    856856        # Figure out which $driver object to use... 
    857         my $driverClass = 'HoneyClient::Agent::Driver::' . $driverName; 
     857        my $driverClass = $driverName; 
    858858 
    859859        if (!defined($data->{$driverName}->{'state'})) { 
     
    998998 
    999999    # XXX: Debugging, remove eventually.  
    1000     print $driverName . ": About to return out of child thread.\n"; 
     1000    print $driverName . " - About to return out of child thread.\n"; 
    10011001    if (!threads->is_detached()) { 
    10021002        threads->detach(); 
     
    10921092            # Initialize the driver object.  
    10931093            # Figure out which $driver object to use... 
    1094             my $driverClass = 'HoneyClient::Agent::Driver::' . $driverName; 
     1094            my $driverClass = $driverName; 
    10951095 
    10961096            if (!defined($data->{$driverName}->{'state'})) {