Hi,

I even tried to add my test dir containing the executable file ftb_watchdog to 
$ENV{PATH} but still mtt can not see ftb_watchdog executable.

MTT::Test::Specify::Simple::Specify(/nfs/rinfs/san/homedirs/ftbteam/svn/mtt_trunk/lib/MTT/Test/Specify/Simple.pm:130):
130:                if (-x $t or $MTT::DoCommand::no_execute) {
  DB<4> p $ENV{PATH}
/nfs/rinfs/san/homedirs/ftbteam/ftt-runs/odin/tmp/installs/Mw54/tests/ftb-test/components/examples:/nfs/rinfs/san/homedirs/ftbteam/ftt-runs/odin/tmp/installs/Mw54/install/sbin:/u/ftbteam/install/sbin/:/u/ftbteam/install/bin/:/u/ftbteam/bin/:/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/opt/CodeAnalyst/bin:/opt/CodeAnalyst/bin
  DB<5> n
MTT::Test::Specify::Simple::Specify(/nfs/rinfs/san/homedirs/ftbteam/svn/mtt_trunk/lib/MTT/Test/Specify/Simple.pm:159):
159:        $ret->{test_result} = 1;
  DB<5>

Any help would be really appreciated.

On 11/12/10 11:08 AM, DongInn Kim wrote:
> Hi,
> 
> MTT::Test::Specify::Simple::Specify(/nfs/rinfs/san/homedirs/ftbteam/svn/mtt_trunk/lib/MTT/Test/Specify/Simple.pm:130):
> 130:                if (-x $t or $MTT::DoCommand::no_execute) {
>   DB<51> p $t
> ftb_watchdog
> 
> 
> Here is the step to add a executable test to a hash reference($ret) if $t is 
> executable or $MTT::DoCommand::no_execute is true.
> $t is pointing to "ftb_watchdog" which is one of the FTB test program, 
> executable, but not on $PATH.
> 
> Are we supposed to setup the $PATH to make the test program executable at 
> this time? If so, does mtt have a simple way to do so?
> What does "$MTT::DoCommand::no_execute" do actually?
> 
> For your convenience, I just copy and paste the part related to adding the 
> executable tests to the hash reference in MTT/Test/Specify/Simple.pm
>     # Now go through those groups and make the final list of tests to pass
>     # upwards
>     foreach my $group (keys %$params) {
> 
>         # Go through the list of tests and create an entry for each
>         foreach my $t (@{$params->{$group}->{tests}}) {
>             # If it's good, add a hash with all the values into the
>             # list of tests
>             if (-x $t or $MTT::DoCommand::no_execute) {
>                 my $one;
>                 # Do a deep copy of the defaults
>                 %{$one} = %{$config};
> 
>                 # Set the test name
>                 $one->{executable} = $t;
>                 Debug("   Adding test: $t (group: $group)\n");
> 
>                 # Set all the other names that were specified for this
>                 # group
>                 foreach my $key (keys %{$params->{$group}}) {
>                     next
>                         if ($key eq "tests");
>                     if ($key =~ /^mpi_details:/) {
>                         $key =~ m/^mpi_details:(.+)/;
>                         $one->{mpi_details}->{$1} = $params->{$group}->{$key};
>                     } else {
>                         $one->{$key} = $params->{$group}->{$key};
>                     }
>                 }
> 
>                 # Save it on the final list of tests
>                 push(@{$ret->{tests}}, $one);
>             }
>         }
>     }
> 
>     # All done
>     $ret->{test_result} = 1;
>     return $ret;
> }
> 
> 
> 
> Regards,
> 

-- 
- DongInn

Reply via email to