Changeset 4288
- Timestamp:
- May 9, 2008, 12:18:02 PM (15 years ago)
- Location:
- branches/2.7-stable/src/test/net/sf/basedb/test
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.7-stable/src/test/net/sf/basedb/test/TestUtil.java
r4249 r4288 24 24 package net.sf.basedb.test; 25 25 26 import java.io.File; 27 import java.io.FileNotFoundException; 26 28 import java.io.FileWriter; 27 29 import java.io.Writer; … … 64 66 Start the testing. Starts BASE and creates a SessionControl. 65 67 */ 66 public static void begin(boolean logMemoryUsage )68 public static void begin(boolean logMemoryUsage, boolean checkTestdata) 67 69 { 68 70 if (Application.isRunning()) return; … … 70 72 try 71 73 { 74 if (checkTestdata) 75 { 76 File testdata = new File("../..", "testdata"); 77 if (!testdata.exists() && !testdata.isDirectory()) 78 { 79 throw new FileNotFoundException("Could not find 'testdata' directory. " + 80 "It must be located in the project root."); 81 } 82 } 72 83 write("++Starting BASE..."); 73 84 if (logMemoryUsage) … … 114 125 public static SessionControl getSessionControl() 115 126 { 116 if (sc == null) begin(false );127 if (sc == null) begin(false, true); 117 128 return sc; 118 129 } -
branches/2.7-stable/src/test/net/sf/basedb/test/merge/Run.java
r2815 r4288 50 50 if (ok && (all || cmds.contains("setup"))) 51 51 { 52 TestUtil.begin(logMemoryUsage );52 TestUtil.begin(logMemoryUsage, false); 53 53 ok = MergeTest.run(); 54 54 tests++; -
branches/2.7-stable/src/test/net/sf/basedb/test/performance/Run.java
r3675 r4288 54 54 55 55 int tests = 0; 56 TestUtil.begin(false );56 TestUtil.begin(false, true); 57 57 boolean ok = PrepareTest.run(user, password); 58 58 if (ok && (all || cmds.contains("raw"))) -
branches/2.7-stable/src/test/net/sf/basedb/test/roles/Run.java
r2568 r4288 50 50 if (ok && (all || cmds.contains("root"))) 51 51 { 52 TestUtil.begin(logMemoryUsage );52 TestUtil.begin(logMemoryUsage, true); 53 53 ok = RootTest.run(); 54 54 tests++; … … 56 56 if (ok && (all || cmds.contains("admin"))) 57 57 { 58 TestUtil.begin(logMemoryUsage );58 TestUtil.begin(logMemoryUsage, true); 59 59 ok = AdminTest.run(); 60 60 tests++; … … 62 62 if (ok && (all || cmds.contains("power"))) 63 63 { 64 TestUtil.begin(logMemoryUsage );64 TestUtil.begin(logMemoryUsage, true); 65 65 ok = PowerUserTest.run(); 66 66 tests++; … … 68 68 if (ok && (all || cmds.contains("user"))) 69 69 { 70 TestUtil.begin(logMemoryUsage );70 TestUtil.begin(logMemoryUsage, true); 71 71 ok = UserTest.run(); 72 72 tests++; … … 74 74 if (ok && (all || cmds.contains("guest"))) 75 75 { 76 TestUtil.begin(logMemoryUsage );76 TestUtil.begin(logMemoryUsage, true); 77 77 ok = GuestTest.run(); 78 78 tests++;
Note: See TracChangeset
for help on using the changeset viewer.