blob: af0b39a9eae43275ea890b7fb9816406aac9f4f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# $Id$
#
# The TestTarget class is for operations that are per-target while testing.
# They can be overridden for specific needs like embedded systems, etc.
package PerlACE::TestTarget;
use strict;
use English;
use POSIX qw(:time_h);
###############################################################################
# Create the proper kind of TestTarget based on arguments or test
# configuration. Pass the PerlACE::ConfigList as the first argument.
sub create_target
{
my $config = shift;
my $target = undef;
if ($config->check_config("LabVIEW_RT")) {
require PerlACE::TestTarget_LVRT;
$target = new PerlACE::TestTarget_LVRT;
}
else {
$target = new PerlACE::TestTarget;
}
return $target;
}
### Constructor and Destructor
sub new
{
my $proto = shift;
my $class = ref ($proto) || $proto;
my $self = {};
bless ($self, $class);
return $self;
}
sub DESTROY
{
my $self = shift;
}
##################################################################
sub LocalFile ($)
{
my $self = shift;
my $file = shift;
my $newfile = PerlACE::LocalFile($file);
return $newfile;
}
sub DeleteFile ($)
{
my $self = shift;
my $file = shift;
unlink $file;
}
sub WaitForFileTimed ($)
{
my $self = shift;
my $file = shift;
my $timeout = shift;
return PerlACE::waitforfile_timed ($file, $timeout);
}
sub CreateProcess ($)
{
my $self = shift;
my $process = new PerlACE::Process (@_);
return $process;
}
# Don't need to do anything in most cases.
sub GetStderrLog ($)
{
my $self = shift;
return;
}
1;
|