summaryrefslogtreecommitdiff
path: root/ACE/bin/PerlACE/TestTarget.pm
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2008-03-04 14:51:23 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2008-03-04 14:51:23 +0000
commit99aa8c60282c7b8072eb35eb9ac815702f5bf586 (patch)
treebda96bf8c3a4c2875a083d7b16720533c8ffeaf4 /ACE/bin/PerlACE/TestTarget.pm
parentc4078c377d74290ebe4e66da0b4975da91732376 (diff)
downloadATCD-99aa8c60282c7b8072eb35eb9ac815702f5bf586.tar.gz
undoing accidental deletion
Diffstat (limited to 'ACE/bin/PerlACE/TestTarget.pm')
-rw-r--r--ACE/bin/PerlACE/TestTarget.pm87
1 files changed, 87 insertions, 0 deletions
diff --git a/ACE/bin/PerlACE/TestTarget.pm b/ACE/bin/PerlACE/TestTarget.pm
new file mode 100644
index 00000000000..af0b39a9eae
--- /dev/null
+++ b/ACE/bin/PerlACE/TestTarget.pm
@@ -0,0 +1,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;