summaryrefslogtreecommitdiff
path: root/ACE
diff options
context:
space:
mode:
authormitza <mitza@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-03-12 21:56:00 +0000
committermitza <mitza@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-03-12 21:56:00 +0000
commit3ecea998dfbbda0c305020c2818cbb2a94b6125d (patch)
tree88977bc24066887e0dbadf0bfd45e6a1f79da684 /ACE
parentb85d101c20cc7ab0f883cf3ebb9c23794d8b09de (diff)
downloadATCD-3ecea998dfbbda0c305020c2818cbb2a94b6125d.tar.gz
ChangeLogTag: Fri Mar 12 21:53:30 UTC 2010 Adam Mitz <mitza@ociweb.com>
Diffstat (limited to 'ACE')
-rw-r--r--ACE/ChangeLog20
-rw-r--r--ACE/bin/PerlACE/ProcessVX.pm2
-rw-r--r--ACE/bin/PerlACE/ProcessVX_Unix.pm45
-rw-r--r--ACE/tests/Log_Msg_Test.cpp2
-rw-r--r--ACE/tests/run_test.lst2
5 files changed, 66 insertions, 5 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index d4e89201115..b2536ce3193 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,21 @@
+Fri Mar 12 21:53:30 UTC 2010 Adam Mitz <mitza@ociweb.com>
+
+ * bin/PerlACE/ProcessVX.pm:
+ * bin/PerlACE/ProcessVX_Unix.pm:
+
+ Added an option to use the 'expect' program to interact with
+ the remote target (via telnet). This is only enabled when the
+ environment variable ACE_RUN_VX_USE_EXPECT is defined.
+
+ * tests/Log_Msg_Test.cpp:
+
+ Updated the ACE_VXWORKS version check to include version 6.8.
+
+ * tests/run_test.lst:
+
+ Added !VxWorks to exclude Pipe_Test which can't be run
+ on VxWorks (kernel mode) because it depends on ACE_Process::spawn().
+
Fri Mar 12 12:09:02 UTC 2010 Olli Savia <ops@iki.fi>
* ace/OS_NS_math.h:
@@ -7,7 +25,7 @@ Fri Mar 12 12:09:02 UTC 2010 Olli Savia <ops@iki.fi>
* tests/OS_Test.cpp:
Added tests for ceil(float) and floor(float).
-
+
Thu Mar 11 09:33:54 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/config-g++-common.h:
diff --git a/ACE/bin/PerlACE/ProcessVX.pm b/ACE/bin/PerlACE/ProcessVX.pm
index 842a35f70fa..12c96055375 100644
--- a/ACE/bin/PerlACE/ProcessVX.pm
+++ b/ACE/bin/PerlACE/ProcessVX.pm
@@ -202,6 +202,8 @@ sub iboot_cycle_power {
if (defined($iboot_outlet) && defined($iboot_user) && defined($iboot_passwd)) {
# We perform case #3
+ # This case doesn't support shutdown
+ return if $mode == 1;
my $t = new Net::Telnet();
diff --git a/ACE/bin/PerlACE/ProcessVX_Unix.pm b/ACE/bin/PerlACE/ProcessVX_Unix.pm
index 2c40d078f0e..d7ec1584b7d 100644
--- a/ACE/bin/PerlACE/ProcessVX_Unix.pm
+++ b/ACE/bin/PerlACE/ProcessVX_Unix.pm
@@ -83,6 +83,41 @@ sub DESTROY
###############################################################################
+# Use the "expect" program to invoke telnet, doesn't need Perl's Net::Telnet.
+# This is run by the child process which was forked from Spawn().
+sub expect_telnet
+{
+ my($host, $port, $prompt, $cmdsRef) = @_;
+ my $pid = open(EXP, "|expect -f -") or die "ERROR: Could not run 'expect'";
+ $SIG{'TERM'} = sub { # If the parent wants to Kill() this process,
+ kill 'TERM', $pid; # send a SIGTERM to the expect process and
+ $SIG{'TERM'} = 'DEFAULT'; # then go back to the normal handler for TERM
+ kill 'TERM', $$; # and invoke it.
+ };
+ print EXP <<EOT;
+set timeout -1
+spawn telnet $host $port
+expect -re "$prompt"
+EOT
+ # target login and password are not currently implemented
+ for my $cmd (@$cmdsRef) {
+ my $cmdEsc = $cmd;
+ $cmdEsc =~ s/\"/\\\"/g; # escape quotes
+ print EXP <<EOT;
+send "$cmdEsc\r"
+expect -re "$prompt"
+EOT
+ }
+ print EXP <<EOT;
+send "exit\r"
+expect -re "Au revoir!"
+exit 0
+EOT
+ close EXP;
+ waitpid $pid, 0;
+}
+
+
# Spawn the process and continue.
sub Spawn ()
@@ -262,7 +297,12 @@ sub Spawn ()
}
if (!defined $telnet_port) {
$telnet_port = 23;
- }
+ }
+ if (defined $ENV{'ACE_RUN_VX_USE_EXPECT'}) {
+ expect_telnet($telnet_host, $telnet_port, $prompt, \@cmds);
+ sleep(2);
+ exit;
+ }
if (defined $ENV{'ACE_TEST_VERBOSE'}) {
print "Opening telnet connection <" . $telnet_host . ":". $telnet_port . ">\n";
}
@@ -424,7 +464,8 @@ sub Kill ()
my $self = shift;
if ($self->{RUNNING} && !defined $ENV{'ACE_TEST_WINDOW'}) {
- kill ('KILL', $self->{PROCESS});
+ kill ((defined $ENV{'ACE_RUN_VX_USE_EXPECT'}) ? 'TERM' : 'KILL',
+ $self->{PROCESS});
waitpid ($self->{PROCESS}, 0);
$self->check_return_value ($?);
}
diff --git a/ACE/tests/Log_Msg_Test.cpp b/ACE/tests/Log_Msg_Test.cpp
index e35b2c38e5b..1134496cdb5 100644
--- a/ACE/tests/Log_Msg_Test.cpp
+++ b/ACE/tests/Log_Msg_Test.cpp
@@ -401,7 +401,7 @@ test_ostream (void)
1);
}
-#if !defined (ACE_VXWORKS) && !defined (ACE_HAS_PHARLAP) || (defined(ACE_VXWORKS) && (ACE_VXWORKS > 0x670))
+#if !defined (ACE_VXWORKS) && !defined (ACE_HAS_PHARLAP) || (defined(ACE_VXWORKS) && (ACE_VXWORKS > 0x680))
# define TEST_CAN_UNLINK_IN_ADVANCE
#endif
diff --git a/ACE/tests/run_test.lst b/ACE/tests/run_test.lst
index 6f1ca25b0da..9b94dbf38d5 100644
--- a/ACE/tests/run_test.lst
+++ b/ACE/tests/run_test.lst
@@ -142,7 +142,7 @@ Object_Manager_Test
Object_Manager_Flipping_Test
Obstack_Test
OrdMultiSet_Test
-Pipe_Test: !PHARLAP
+Pipe_Test: !PHARLAP !VxWorks
Priority_Buffer_Test
Priority_Reactor_Test: !ACE_FOR_TAO
Priority_Task_Test: !Unicos