From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14171 invoked by alias); 28 Feb 2008 21:14:48 -0000 Received: (qmail 14145 invoked by uid 9519); 28 Feb 2008 21:14:48 -0000 Date: Thu, 28 Feb 2008 21:14:00 -0000 Message-ID: <20080228211447.14130.qmail@sourceware.org> From: rmoseley@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Fix TestKillCommand's expression parsing. X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 3643b66d9a569802481310b2d76ed78412a306af X-Git-Newrev: f2e18d6c724bca52c05b0c9e47ef3a0bc0454a6e Mailing-List: contact frysk-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-cvs-owner@sourceware.org Reply-To: frysk@sourceware.org X-SW-Source: 2008-q1/txt/msg00279.txt.bz2 The branch, master has been updated via f2e18d6c724bca52c05b0c9e47ef3a0bc0454a6e (commit) from 3643b66d9a569802481310b2d76ed78412a306af (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit f2e18d6c724bca52c05b0c9e47ef3a0bc0454a6e Author: Rick Moseley Date: Thu Feb 28 15:13:39 2008 -0600 Fix TestKillCommand's expression parsing. * TestKillCommand.java: Fix regular expressions; add wait so test will successfully finish. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/hpd/ChangeLog | 5 ++ frysk-core/frysk/hpd/TestKillCommand.java | 68 ++++++++++++++++++++--------- 2 files changed, 52 insertions(+), 21 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog index 917fd09..8dc7053 100644 --- a/frysk-core/frysk/hpd/ChangeLog +++ b/frysk-core/frysk/hpd/ChangeLog @@ -1,3 +1,8 @@ +2008-02-28 Rick Moseley + + * TestKillCommand.java: Fix regular expressions; add wait so + test will successfully finish. + 2008-02-28 Tim Moore * CLI.java (constructors): Take a Writer argument instead of a diff --git a/frysk-core/frysk/hpd/TestKillCommand.java b/frysk-core/frysk/hpd/TestKillCommand.java index 0d1decd..a0847ec 100644 --- a/frysk-core/frysk/hpd/TestKillCommand.java +++ b/frysk-core/frysk/hpd/TestKillCommand.java @@ -60,16 +60,15 @@ public class TestKillCommand extends TestLib { } */ e = new HpdTestbed(); - e.send("load " + Config.getPkgLibFile("funit-threads-looper").getPath() - + "\n"); - e.expect("Loaded executable file*"); - e.send("run\n"); - e.expect("Attached to process*"); - e.send("go\n"); - e.expect("Running process*"); - e.send("kill\n"); - e.expect("Killing process*"); - e.expect("Loaded executable file*"); + e.sendCommandExpectPrompt("load " + Config.getPkgLibFile("funit-threads-looper").getPath(), + "Loaded executable file.*"); + + e.sendCommandExpectPrompt("run", "Attached to process.*"); + try { Thread.sleep(500); } catch (Exception e) { } + e.sendCommandExpectPrompt("go", "Running process.*"); + try { Thread.sleep(500); } catch (Exception e) { } + e.sendCommandExpectPrompt("kill", "Killing process.*Loaded executable file.*"); + /* Make sure you run again to make sure all has been cleaned up properly * from the last run. */ @@ -89,9 +88,25 @@ public class TestKillCommand extends TestLib { e.expect("Killing process*"); e.expect("Loaded executable file*"); /* Make sure we can quit gracefully */ - /* - e.send("quit\n"); - e.expect("Quitting*"); */ + + /* adding the quit/Quitting statements causes this backtrace: + * + * frysk.expunit.EndOfFileException: end-of-file; expecting: <>; buffer <>; buffer <