public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: frysk-gui/frysk/gui/ChangeLog
@ 2008-04-14 19:43 cagney
  0 siblings, 0 replies; only message in thread
From: cagney @ 2008-04-14 19:43 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  f52d581e1acd78bbe6c62be4f3dd2f050e3636b7 (commit)
      from  50dd27460503311919f41c0c2ad58f150875fd3a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit f52d581e1acd78bbe6c62be4f3dd2f050e3636b7
Author: Andrew Cagney <cagney@redhat.com>
Date:   Mon Apr 14 15:42:29 2008 -0400

    frysk-gui/frysk/gui/ChangeLog
    2008-04-14  Andrew Cagney  <cagney@redhat.com>
    
    	* test/GuiTestCase.java: Move getFryskTestDir() to here.
    
    frysk-sys/frysk/config/ChangeLog
    2008-04-14  Andrew Cagney  <cagney@redhat.com>
    
    	* Config.java (getFryskTestDir()): Delete.

-----------------------------------------------------------------------

Summary of changes:
 frysk-gui/frysk/gui/ChangeLog             |    4 ++++
 frysk-gui/frysk/gui/test/GuiTestCase.java |   28 ++++++++++++++++++++++++++--
 frysk-sys/frysk/config/ChangeLog          |    2 ++
 frysk-sys/frysk/config/Config.java        |   18 ------------------
 4 files changed, 32 insertions(+), 20 deletions(-)

First 500 lines of diff:
diff --git a/frysk-gui/frysk/gui/ChangeLog b/frysk-gui/frysk/gui/ChangeLog
index 509718b..696c4c4 100644
--- a/frysk-gui/frysk/gui/ChangeLog
+++ b/frysk-gui/frysk/gui/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-14  Andrew Cagney  <cagney@redhat.com>
+
+	* test/GuiTestCase.java: Move getFryskTestDir() to here.
+
 2008-04-01  Petr Machata  <pmachata@redhat.com>
 
 	* disassembler/DisassemblyWindow.java: Call getAddresses instead of getSymbol.
diff --git a/frysk-gui/frysk/gui/test/GuiTestCase.java b/frysk-gui/frysk/gui/test/GuiTestCase.java
index 280d992..12b1ff9 100644
--- a/frysk-gui/frysk/gui/test/GuiTestCase.java
+++ b/frysk-gui/frysk/gui/test/GuiTestCase.java
@@ -41,8 +41,8 @@ package frysk.gui.test;
 
 import java.io.File;
 
-import frysk.config.Config;
 import frysk.junit.TestCase;
+import frysk.testbed.TearDownFile;
 
 public class GuiTestCase extends TestCase{
   public static File TEST_DIR;
@@ -50,11 +50,35 @@ public class GuiTestCase extends TestCase{
   public static File SESSIONS_TEST_DIR ;
   public static File TAGSETS_TEST_DIR;
   
+
+    /**
+     * FIXME: Should have a frysk.testbed.TearDownDirectory factory
+     * that handles all this.
+     */
+    private File getFryskTestDir() throws Exception {
+	File file = null;
+	file = TearDownFile.create();
+	
+	String path = file.getAbsolutePath();
+	file.delete();
+	file = new File(path);
+	
+	if(!file.mkdirs()){
+	    throw new Exception("Could not create test directory " + file.getAbsolutePath());
+	}
+	
+	// FIXME: deleteOnExit() isn't really reliable; especially
+	// when there's no guarentee that the directory contains no
+	// files; should be a TearDownDirectory object.
+	file.deleteOnExit();
+	return file;
+    }
+
   protected void setUp () throws Exception
   {
     super.setUp();
     
-    TEST_DIR =  Config.getFryskTestDir();
+    TEST_DIR = getFryskTestDir();
     OBSERVERS_TEST_DIR = new File(TEST_DIR.getPath() + "/Observers/");
     SESSIONS_TEST_DIR = new File(TEST_DIR.getPath() + "/Sessions/");
     TAGSETS_TEST_DIR = new File(TEST_DIR.getPath() + "/Tagsets/");
diff --git a/frysk-sys/frysk/config/ChangeLog b/frysk-sys/frysk/config/ChangeLog
index 0d6da54..1d6ad89 100644
--- a/frysk-sys/frysk/config/ChangeLog
+++ b/frysk-sys/frysk/config/ChangeLog
@@ -1,5 +1,7 @@
 2008-04-14  Andrew Cagney  <cagney@redhat.com>
 
+	* Config.java (getFryskTestDir()): Delete.
+	
 	* jni/Config.cxx (Java_frysk_config_Config_getWordSize): Delete.
 	(Java_frysk_config_Config_getTargetCpuXXX): Delete.
 	* cni/Config.cxx-in (Config::getWordSize): Delete.
diff --git a/frysk-sys/frysk/config/Config.java b/frysk-sys/frysk/config/Config.java
index e08bc93..e0be0c3 100644
--- a/frysk-sys/frysk/config/Config.java
+++ b/frysk-sys/frysk/config/Config.java
@@ -41,8 +41,6 @@ package frysk.config;
 
 import java.io.File;
 
-import frysk.testbed.TearDownFile;
-
 /**
  * All the run-time (install time) configuration information.
  */
@@ -219,22 +217,6 @@ public class Config
 	return file;
     }
     
-    public static File getFryskTestDir() throws Exception {
-	File file = null;
-	file = TearDownFile.create();
-      
-	String path = file.getAbsolutePath();
-	file.delete();
-	file = new File(path);
-      
-	if(!file.mkdirs()){
-	    throw new Exception("Could not create test directory " + file.getAbsolutePath());
-	}
-      
-	file.deleteOnExit();
-	return file;
-    }
-    
     public static File getHomeDir() {
 	//XXX: Should not use user.home property.
 	return new File(System.getProperty("user.home"));


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-14 19:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-14 19:43 [SCM] master: frysk-gui/frysk/gui/ChangeLog cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).