3 package PerlACE
::TestTarget_VxWorks
;
5 # ******************************************************************
6 # Description : Creates a PerlACE::ProcessVX
7 # Author : Chad Elliott
8 # Create Date : 6/20/2008
9 # ******************************************************************
11 # ******************************************************************
13 # ******************************************************************
14 use PerlACE
::TestTarget
;
18 use PerlACE
::ProcessVX
;
22 our @ISA = qw(PerlACE::TestTarget);
24 # ******************************************************************
26 # ******************************************************************
29 my($self, $file) = @_;
30 if (defined $ENV{'ACE_TEST_VERBOSE'}) {
31 print STDERR
"LocalFile is $file\n";
39 if (defined $ENV{'ACE_TEST_VERBOSE'}) {
40 print STDERR
"Adding libpath $dir\n";
42 PerlACE
::add_lib_path
($dir);
47 my $process = new PerlACE
::ProcessVX
(@_);
48 $process->{TARGET
} = $self;
52 # Need a reboot when this target is destroyed.
56 $self->{REBOOT_NEEDED
} = 1;
63 $self->{REBOOT_NEEDED
} = undef;
64 print STDERR
"Attempting to reboot target...\n";
68 sub WaitForFileTimed
($)
74 my $prjroot = defined $ENV{'ACE_RUN_VX_PRJ_ROOT'} ?
$ENV{'ACE_RUN_VX_PRJ_ROOT'} : $ENV{'ACE_ROOT'};
75 if (length ($cwdrel) > 0) {
76 $cwdrel = File
::Spec
->abs2rel( cwd
(), $prjroot );
79 $cwdrel = File
::Spec
->abs2rel( $cwdrel, $prjroot );
81 my $newfile = $self->{HOST_ROOT
} . "/" . $cwdrel . "/" . $file;
82 return PerlACE
::waitforfile_timed
($newfile, $timeout);
89 PerlACE
::ProcessVX
::kill_all
($procmask, $self);