diff options
author | Martin Corino <mcorino@remedy.nl> | 2017-03-05 16:45:28 +0100 |
---|---|---|
committer | Martin Corino <mcorino@remedy.nl> | 2017-03-05 16:45:28 +0100 |
commit | 6f1199fe6abf7669b9c3552503a4701686488c01 (patch) | |
tree | aa02d93c202ab04d442d72e36df703ab6e13e3b6 /ACE/bin/PerlACE/TestTarget.pm | |
parent | bfdd9ee8c0cab97c5bf46c682fc46f8dc22a21c6 (diff) | |
download | ATCD-6f1199fe6abf7669b9c3552503a4701686488c01.tar.gz |
Improvements for Android AVD testing.
Diffstat (limited to 'ACE/bin/PerlACE/TestTarget.pm')
-rw-r--r-- | ACE/bin/PerlACE/TestTarget.pm | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/ACE/bin/PerlACE/TestTarget.pm b/ACE/bin/PerlACE/TestTarget.pm index 6cea0d96b74..f37529cdf0d 100644 --- a/ACE/bin/PerlACE/TestTarget.pm +++ b/ACE/bin/PerlACE/TestTarget.pm @@ -47,7 +47,7 @@ sub create_target } my $config_os = $ENV{$envname}; SWITCH: { - if ($config_os =~ m/local|remote/i) { + if ($config_os =~ m/local|remote|avd/i) { $target = new PerlACE::TestTarget ($config_name); last SWITCH; } @@ -200,8 +200,8 @@ sub GetConfigSettings ($) } if ($fs_root ne $tgt_fs_root) { - $self->{HOST_FSROOT} = dirname ($fs_root); - $self->{TARGET_FSROOT} = dirname ($tgt_fs_root); + $self->{HOST_FSROOT} = $fs_root; + $self->{TARGET_FSROOT} = $tgt_fs_root; } $env_name = $env_prefix.'EXE_SUBDIR'; @@ -313,6 +313,14 @@ sub GetConfigSettings ($) if (exists $ENV{$env_name}) { $self->{REMOTE_SHELL} = $ENV{$env_name}; } + $env_name = $env_prefix.'PUT_CMD'; + if (exists $ENV{$env_name}) { + $self->{PUT_CMD} = $ENV{$env_name}; + } + $env_name = $env_prefix.'GET_CMD'; + if (exists $ENV{$env_name}) { + $self->{GET_CMD} = $ENV{$env_name}; + } $env_name = $env_prefix.'LIBPATH'; if (exists $ENV{$env_name}) { $self->{LIBPATH} = $ENV{$env_name}; @@ -547,7 +555,12 @@ sub GetFile ($) $local_file = $remote_file; $remote_file = $self->LocalFile($local_file); } - if (($remote_file ne $local_file) && + if (defined $self->{GET_CMD}) { + if (system ($self->{GET_CMD}.' '.$remote_file.' '.$local_file) != 0) { + print STDERR "ERROR executing [".$self->{GET_CMD}." $remote_file $local_file]\n"; + } + } + elsif (($remote_file ne $local_file) && (File::Spec->rel2abs($remote_file) ne File::Spec->rel2abs($local_file))) { copy ($remote_file, $local_file); } @@ -560,7 +573,12 @@ sub PutFile ($) my $self = shift; my $src = shift; my $dest = $self->LocalFile ($src); - if (($src ne $dest) && + if (defined $self->{PUT_CMD}) { + if (system ($self->{PUT_CMD}.' '.$src.' '.$dest) != 0) { + print STDERR "ERROR executing [".$self->{PUT_CMD}." $src $dest]\n"; + } + } + elsif (($src ne $dest) && (File::Spec->rel2abs($src) ne File::Spec->rel2abs($dest))) { copy ($src, $dest); } |