|
From: <cr...@us...> - 2009-04-20 14:53:59
|
Revision: 5324
http://jnode.svn.sourceforge.net/jnode/?rev=5324&view=rev
Author: crawley
Date: 2009-04-20 14:53:47 +0000 (Mon, 20 Apr 2009)
Log Message:
-----------
Yesterdays changes to CommandShell messed up initialization in the
EmuShell ... and hence for TestHarness.
Modified Paths:
--------------
trunk/shell/src/shell/org/jnode/shell/CommandShell.java
trunk/shell/src/test/org/jnode/test/shell/harness/TestRunnerBase.java
Modified: trunk/shell/src/shell/org/jnode/shell/CommandShell.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/CommandShell.java 2009-04-20 11:39:59 UTC (rev 5323)
+++ trunk/shell/src/shell/org/jnode/shell/CommandShell.java 2009-04-20 14:53:47 UTC (rev 5324)
@@ -272,9 +272,10 @@
* @param syntaxMgr test framework supplies a syntax manager
*/
protected CommandShell(AliasManager aliasMgr, SyntaxManager syntaxMgr) {
+ this.debugEnabled = true;
this.aliasMgr = aliasMgr;
this.syntaxMgr = syntaxMgr;
- this.debugEnabled = true;
+ propertyMap = initShellProperties();
setupStreams(
new InputStreamReader(System.in),
new OutputStreamWriter(System.out),
@@ -479,7 +480,7 @@
try {
setupFromProperties();
- } catch (ShellException ex) {
+ } catch (Throwable ex) {
errPW.println("Problem shell configuration");
errPW.println(ex.getMessage());
stackTrace(ex);
@@ -488,7 +489,7 @@
propertyMap.put(INTERPRETER_PROPERTY_NAME, FALLBACK_INTERPRETER);
try {
setupFromProperties();
- } catch (ShellException ex2) {
+ } catch (Throwable ex2) {
throw new ShellFailureException(
"Bailing out: fatal error during CommandShell configuration", ex2);
}
@@ -498,6 +499,11 @@
ownThread = Thread.currentThread();
}
+ public void configureEmuShell() throws ShellException {
+ propertyMap.put(INVOKER_PROPERTY_NAME, "thread");
+ configureShell();
+ }
+
@Override
public String getProperty(String propName) {
return propertyMap.get(propName);
Modified: trunk/shell/src/test/org/jnode/test/shell/harness/TestRunnerBase.java
===================================================================
--- trunk/shell/src/test/org/jnode/test/shell/harness/TestRunnerBase.java 2009-04-20 11:39:59 UTC (rev 5323)
+++ trunk/shell/src/test/org/jnode/test/shell/harness/TestRunnerBase.java 2009-04-20 14:53:47 UTC (rev 5324)
@@ -92,7 +92,7 @@
public CommandShell getShell() throws ShellException {
CommandShell shell = new TestCommandShell(System.in, System.out, System.err);
- shell.configureShell();
+ shell.configureEmuShell();
return shell;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|