git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277219 13f79535-47bb-0310-9956-ffa450edef68master
@@ -574,7 +574,7 @@ public class Path extends DataType implements Cloneable { | |||||
* Add the Java Runtime classes to this Path instance. | * Add the Java Runtime classes to this Path instance. | ||||
*/ | */ | ||||
public void addJavaRuntime() { | public void addJavaRuntime() { | ||||
if ("Kaffe".equals(System.getProperty("java.vm.name"))) { | |||||
if (JavaEnvUtils.isKaffe()) { | |||||
// newer versions of Kaffe (1.1.1+) won't have this, | // newer versions of Kaffe (1.1.1+) won't have this, | ||||
// but this will be sorted by FileSet anyway. | // but this will be sorted by FileSet anyway. | ||||
File kaffeShare = new File(System.getProperty("java.home") | File kaffeShare = new File(System.getProperty("java.home") | ||||
@@ -67,6 +67,9 @@ public class JavaEnvUtils { | |||||
/** Version constant for Java 1.5 */ | /** Version constant for Java 1.5 */ | ||||
public static final String JAVA_1_5 = "1.5"; | public static final String JAVA_1_5 = "1.5"; | ||||
/** Whether this is the Kaffe VM */ | |||||
private static boolean kaffeDetected; | |||||
/** array of packages in the runtime */ | /** array of packages in the runtime */ | ||||
private static Vector jrePackages; | private static Vector jrePackages; | ||||
@@ -103,6 +106,13 @@ public class JavaEnvUtils { | |||||
// swallow as we've hit the max class version that | // swallow as we've hit the max class version that | ||||
// we have | // we have | ||||
} | } | ||||
kaffeDetected = false; | |||||
try { | |||||
Class.forName("kaffe.util.NotImplemented"); | |||||
kaffeDetected = true; | |||||
} catch (Throwable t) { | |||||
// swallow as this simply doesn't seem to be Kaffe | |||||
} | |||||
} | } | ||||
/** | /** | ||||
@@ -125,6 +135,16 @@ public class JavaEnvUtils { | |||||
return javaVersion.equals(version); | return javaVersion.equals(version); | ||||
} | } | ||||
/** | |||||
* Checks whether the current Java VM is Kaffe. | |||||
* @return true if the current Java VM is Kaffe. | |||||
* @since Ant 1.6.3 | |||||
* @see http://www.kaffe.org/ | |||||
*/ | |||||
public static boolean isKaffe() { | |||||
return kaffeDetected; | |||||
} | |||||
/** | /** | ||||
* Finds an executable that is part of a JRE installation based on | * Finds an executable that is part of a JRE installation based on | ||||
* the java.home system property. | * the java.home system property. | ||||
@@ -142,7 +142,7 @@ public class ConcatFilterTest extends BuildFileTest { | |||||
try { | try { | ||||
File file = getProject().resolveFile(filename); | File file = getProject().resolveFile(filename); | ||||
java.io.FileReader rdr = new java.io.FileReader(file); | java.io.FileReader rdr = new java.io.FileReader(file); | ||||
content = fu.readFully(rdr); | |||||
content = FileUtils.readFully(rdr); | |||||
rdr.close(); | rdr.close(); | ||||
rdr = null; | rdr = null; | ||||
} catch (Exception e) { | } catch (Exception e) { | ||||
@@ -68,7 +68,7 @@ public class DynamicFilterTest extends BuildFileTest { | |||||
Reader r = null; | Reader r = null; | ||||
try { | try { | ||||
r = new FileReader(getProject().resolveFile(filename)); | r = new FileReader(getProject().resolveFile(filename)); | ||||
return FileUtils.newFileUtils().readFully(r); | |||||
return FileUtils.readFully(r); | |||||
} | } | ||||
finally { | finally { | ||||
try {r.close();} catch (Throwable ignore) {} | try {r.close();} catch (Throwable ignore) {} | ||||
@@ -248,7 +248,7 @@ public class TokenFilterTest extends BuildFileTest { | |||||
Reader r = null; | Reader r = null; | ||||
try { | try { | ||||
r = new FileReader(getProject().resolveFile(filename)); | r = new FileReader(getProject().resolveFile(filename)); | ||||
return FileUtils.newFileUtils().readFully(r); | |||||
return FileUtils.readFully(r); | |||||
} | } | ||||
finally { | finally { | ||||
try {r.close();} catch (Throwable ignore) {} | try {r.close();} catch (Throwable ignore) {} | ||||
@@ -27,11 +27,11 @@ import org.apache.tools.ant.BuildFileTest; | |||||
*/ | */ | ||||
public class CVSPassTest extends BuildFileTest { | public class CVSPassTest extends BuildFileTest { | ||||
private final String EOL = System.getProperty("line.separator"); | private final String EOL = System.getProperty("line.separator"); | ||||
private final String JAKARTA_URL = | |||||
private static final String JAKARTA_URL = | |||||
":pserver:anoncvs@jakarta.apache.org:/home/cvspublic Ay=0=h<Z"; | ":pserver:anoncvs@jakarta.apache.org:/home/cvspublic Ay=0=h<Z"; | ||||
private final String XML_URL = | |||||
private static final String XML_URL = | |||||
":pserver:anoncvs@xml.apache.org:/home/cvspublic Ay=0=h<Z"; | ":pserver:anoncvs@xml.apache.org:/home/cvspublic Ay=0=h<Z"; | ||||
private final String TIGRIS_URL = | |||||
private static final String TIGRIS_URL = | |||||
":pserver:guest@cvs.tigris.org:/cvs AIbdZ,"; | ":pserver:guest@cvs.tigris.org:/cvs AIbdZ,"; | ||||
@@ -240,7 +240,7 @@ public class ConcatTest | |||||
Reader r = null; | Reader r = null; | ||||
try { | try { | ||||
r = new FileReader(getProject().resolveFile(filename)); | r = new FileReader(getProject().resolveFile(filename)); | ||||
return FileUtils.newFileUtils().readFully(r); | |||||
return FileUtils.readFully(r); | |||||
} | } | ||||
finally { | finally { | ||||
try {r.close();} catch (Throwable ignore) {} | try {r.close();} catch (Throwable ignore) {} | ||||
@@ -34,10 +34,10 @@ import junit.framework.ComparisonFailure; | |||||
public class ExecTaskTest extends BuildFileTest { | public class ExecTaskTest extends BuildFileTest { | ||||
private static final String BUILD_PATH = "src/etc/testcases/taskdefs/exec/"; | private static final String BUILD_PATH = "src/etc/testcases/taskdefs/exec/"; | ||||
private static final String BUILD_FILE = BUILD_PATH + "exec.xml"; | private static final String BUILD_FILE = BUILD_PATH + "exec.xml"; | ||||
private final int TIME_TO_WAIT = 1; | |||||
private static final int TIME_TO_WAIT = 1; | |||||
/** maximum time allowed for the build in milliseconds */ | /** maximum time allowed for the build in milliseconds */ | ||||
private final int MAX_BUILD_TIME = 4000; | |||||
private final int SECURITY_MARGIN = 2000; // wait 2 second extras | |||||
private static final int MAX_BUILD_TIME = 4000; | |||||
private static final int SECURITY_MARGIN = 2000; // wait 2 second extras | |||||
// the test failed with 100 ms of margin on cvs.apache.org on August 1st, 2003 | // the test failed with 100 ms of margin on cvs.apache.org on August 1st, 2003 | ||||
private File logFile; | private File logFile; | ||||
private MonitoredBuild myBuild = null; | private MonitoredBuild myBuild = null; | ||||
@@ -465,7 +465,7 @@ public class ExecTaskTest extends BuildFileTest { | |||||
FileReader reader = null; | FileReader reader = null; | ||||
try { | try { | ||||
reader = new FileReader(getProject().resolveFile(filename)); | reader = new FileReader(getProject().resolveFile(filename)); | ||||
result = FileUtils.newFileUtils().readFully(reader); | |||||
result = FileUtils.readFully(reader); | |||||
} catch (IOException eyeOhEx) { | } catch (IOException eyeOhEx) { | ||||
} finally { | } finally { | ||||
if (reader != null) { | if (reader != null) { | ||||
@@ -564,7 +564,7 @@ public class ExecuteOnTest extends BuildFileTest { | |||||
FileReader reader = null; | FileReader reader = null; | ||||
try { | try { | ||||
reader = new FileReader(getProject().resolveFile(filename)); | reader = new FileReader(getProject().resolveFile(filename)); | ||||
result = FileUtils.newFileUtils().readFully(reader); | |||||
result = FileUtils.readFully(reader); | |||||
} finally { | } finally { | ||||
if (reader != null) { | if (reader != null) { | ||||
try { | try { | ||||
@@ -191,8 +191,8 @@ public class ManifestTest extends BuildFileTest { | |||||
* Tets long line wrapping | * Tets long line wrapping | ||||
*/ | */ | ||||
public void testLongLine() throws IOException, ManifestException { | public void testLongLine() throws IOException, ManifestException { | ||||
Project project = getProject(); | |||||
project.setUserProperty("test.longline", LONG_LINE); | |||||
Project p = getProject(); | |||||
p.setUserProperty("test.longline", LONG_LINE); | |||||
executeTarget("testLongLine"); | executeTarget("testLongLine"); | ||||
Manifest manifest = getManifest(EXPANDED_MANIFEST); | Manifest manifest = getManifest(EXPANDED_MANIFEST); | ||||
@@ -58,9 +58,9 @@ public class ParallelTest extends BuildFileTest { | |||||
/** tests basic operation of the parallel task */ | /** tests basic operation of the parallel task */ | ||||
public void testBasic() { | public void testBasic() { | ||||
// should get no output at all | // should get no output at all | ||||
Project project = getProject(); | |||||
project.setUserProperty("test.direct", DIRECT_MESSAGE); | |||||
project.setUserProperty("test.delayed", DELAYED_MESSAGE); | |||||
Project p = getProject(); | |||||
p.setUserProperty("test.direct", DIRECT_MESSAGE); | |||||
p.setUserProperty("test.delayed", DELAYED_MESSAGE); | |||||
expectOutputAndError("testBasic", "", ""); | expectOutputAndError("testBasic", "", ""); | ||||
String log = getLog(); | String log = getLog(); | ||||
assertEquals("parallel tasks didn't output correct data", log, | assertEquals("parallel tasks didn't output correct data", log, | ||||
@@ -71,9 +71,9 @@ public class ParallelTest extends BuildFileTest { | |||||
/** tests basic operation of the parallel task */ | /** tests basic operation of the parallel task */ | ||||
public void testThreadCount() { | public void testThreadCount() { | ||||
// should get no output at all | // should get no output at all | ||||
Project project = getProject(); | |||||
project.setUserProperty("test.direct", DIRECT_MESSAGE); | |||||
project.setUserProperty("test.delayed", DELAYED_MESSAGE); | |||||
Project p = getProject(); | |||||
p.setUserProperty("test.direct", DIRECT_MESSAGE); | |||||
p.setUserProperty("test.delayed", DELAYED_MESSAGE); | |||||
expectOutputAndError("testThreadCount", "", ""); | expectOutputAndError("testThreadCount", "", ""); | ||||
String log = getLog(); | String log = getLog(); | ||||
int pos = 0; | int pos = 0; | ||||
@@ -126,24 +126,24 @@ public class ParallelTest extends BuildFileTest { | |||||
/** tests the failure of a task within a parallel construction */ | /** tests the failure of a task within a parallel construction */ | ||||
public void testFail() { | public void testFail() { | ||||
// should get no output at all | // should get no output at all | ||||
Project project = getProject(); | |||||
project.setUserProperty("test.failure", FAILURE_MESSAGE); | |||||
project.setUserProperty("test.delayed", DELAYED_MESSAGE); | |||||
Project p = getProject(); | |||||
p.setUserProperty("test.failure", FAILURE_MESSAGE); | |||||
p.setUserProperty("test.delayed", DELAYED_MESSAGE); | |||||
expectBuildExceptionContaining("testFail", | expectBuildExceptionContaining("testFail", | ||||
"fail task in one parallel branch", FAILURE_MESSAGE); | "fail task in one parallel branch", FAILURE_MESSAGE); | ||||
} | } | ||||
/** tests the demuxing of output streams in a multithreaded situation */ | /** tests the demuxing of output streams in a multithreaded situation */ | ||||
public void testDemux() { | public void testDemux() { | ||||
Project project = getProject(); | |||||
project.addTaskDefinition("demuxtest", DemuxOutputTask.class); | |||||
Project p = getProject(); | |||||
p.addTaskDefinition("demuxtest", DemuxOutputTask.class); | |||||
PrintStream out = System.out; | PrintStream out = System.out; | ||||
PrintStream err = System.err; | PrintStream err = System.err; | ||||
System.setOut(new PrintStream(new DemuxOutputStream(project, false))); | |||||
System.setErr(new PrintStream(new DemuxOutputStream(project, true))); | |||||
System.setOut(new PrintStream(new DemuxOutputStream(p, false))); | |||||
System.setErr(new PrintStream(new DemuxOutputStream(p, true))); | |||||
try { | try { | ||||
project.executeTarget("testDemux"); | |||||
p.executeTarget("testDemux"); | |||||
} finally { | } finally { | ||||
System.setOut(out); | System.setOut(out); | ||||
System.setErr(err); | System.setErr(err); | ||||
@@ -59,12 +59,12 @@ public class SQLExecTest extends TestCase { | |||||
protected void setUp() throws Exception { | protected void setUp() throws Exception { | ||||
// make sure the cache is cleared. | // make sure the cache is cleared. | ||||
SQLExec.getLoaderMap().clear(); | |||||
JDBCTask.getLoaderMap().clear(); | |||||
} | } | ||||
// simple test to ensure that the caching does work... | // simple test to ensure that the caching does work... | ||||
public void testDriverCaching(){ | public void testDriverCaching(){ | ||||
SQLExec sql = createTask(getProperties(NULL)); | |||||
SQLExec sql = createTask(getProperties(NULL)); | |||||
assertTrue(!SQLExec.getLoaderMap().containsKey(NULL_DRIVER)); | assertTrue(!SQLExec.getLoaderMap().containsKey(NULL_DRIVER)); | ||||
try { | try { | ||||
sql.execute(); | sql.execute(); | ||||
@@ -72,20 +72,20 @@ public class SQLExecTest extends TestCase { | |||||
assertTrue(e.getException().getMessage().indexOf("No suitable Driver") != -1); | assertTrue(e.getException().getMessage().indexOf("No suitable Driver") != -1); | ||||
} | } | ||||
assertTrue(SQLExec.getLoaderMap().containsKey(NULL_DRIVER)); | assertTrue(SQLExec.getLoaderMap().containsKey(NULL_DRIVER)); | ||||
assertSame(sql.getLoader(), SQLExec.getLoaderMap().get(NULL_DRIVER)); | |||||
assertSame(sql.getLoader(), JDBCTask.getLoaderMap().get(NULL_DRIVER)); | |||||
ClassLoader loader1 = sql.getLoader(); | ClassLoader loader1 = sql.getLoader(); | ||||
// 2nd run.. | // 2nd run.. | ||||
sql = createTask(getProperties(NULL)); | sql = createTask(getProperties(NULL)); | ||||
// the driver must still be cached. | // the driver must still be cached. | ||||
assertTrue(sql.getLoaderMap().containsKey(NULL_DRIVER)); | |||||
assertTrue(JDBCTask.getLoaderMap().containsKey(NULL_DRIVER)); | |||||
try { | try { | ||||
sql.execute(); | sql.execute(); | ||||
} catch (BuildException e){ | } catch (BuildException e){ | ||||
assertTrue(e.getException().getMessage().indexOf("No suitable Driver") != -1); | assertTrue(e.getException().getMessage().indexOf("No suitable Driver") != -1); | ||||
} | } | ||||
assertTrue(sql.getLoaderMap().containsKey(NULL_DRIVER)); | |||||
assertSame(sql.getLoader(), sql.getLoaderMap().get(NULL_DRIVER)); | |||||
assertTrue(JDBCTask.getLoaderMap().containsKey(NULL_DRIVER)); | |||||
assertSame(sql.getLoader(), JDBCTask.getLoaderMap().get(NULL_DRIVER)); | |||||
assertSame(loader1, sql.getLoader()); | assertSame(loader1, sql.getLoader()); | ||||
} | } | ||||
@@ -108,7 +108,7 @@ public class StyleTest extends BuildFileTest { | |||||
Reader r = null; | Reader r = null; | ||||
try { | try { | ||||
r = new FileReader(getProject().resolveFile(filename)); | r = new FileReader(getProject().resolveFile(filename)); | ||||
return FileUtils.newFileUtils().readFully(r); | |||||
return FileUtils.readFully(r); | |||||
} | } | ||||
finally { | finally { | ||||
try {r.close();} catch (Throwable ignore) {} | try {r.close();} catch (Throwable ignore) {} | ||||
@@ -141,10 +141,10 @@ public class XmlPropertyTest extends BuildFileTest { | |||||
// System.out.println(msg + " (" + propertyFile.getName() + ") in (" + workingDir + ")"); | // System.out.println(msg + " (" + propertyFile.getName() + ") in (" + workingDir + ")"); | ||||
Project project = new Project(); | |||||
Project p = new Project(); | |||||
XmlProperty xmlproperty = new XmlProperty(); | XmlProperty xmlproperty = new XmlProperty(); | ||||
xmlproperty.setProject(project); | |||||
xmlproperty.setProject(p); | |||||
xmlproperty.setFile(inputFile); | xmlproperty.setFile(inputFile); | ||||
xmlproperty.setKeeproot(keepRoot); | xmlproperty.setKeeproot(keepRoot); | ||||
@@ -156,17 +156,17 @@ public class XmlPropertyTest extends BuildFileTest { | |||||
// Set a property on the project to make sure that loading | // Set a property on the project to make sure that loading | ||||
// a property with the same name from an xml file will | // a property with the same name from an xml file will | ||||
// *not* change it. | // *not* change it. | ||||
project.setNewProperty("override.property.test", "foo"); | |||||
p.setNewProperty("override.property.test", "foo"); | |||||
xmlproperty.execute(); | xmlproperty.execute(); | ||||
Properties props = new Properties(); | Properties props = new Properties(); | ||||
props.load(new FileInputStream(propertyFile)); | props.load(new FileInputStream(propertyFile)); | ||||
//printProperties(project.getProperties()); | |||||
//printProperties(p.getProperties()); | |||||
ensureProperties(msg, inputFile, workingDir, project, props); | |||||
ensureReferences(msg, inputFile, project.getReferences()); | |||||
ensureProperties(msg, inputFile, workingDir, p, props); | |||||
ensureReferences(msg, inputFile, p.getReferences()); | |||||
} catch (IOException ex) { | } catch (IOException ex) { | ||||
fail(ex.toString()); | fail(ex.toString()); | ||||
@@ -181,9 +181,9 @@ public class XmlPropertyTest extends BuildFileTest { | |||||
* to generic Project/Task configuration. | * to generic Project/Task configuration. | ||||
*/ | */ | ||||
private static void ensureProperties (String msg, File inputFile, | private static void ensureProperties (String msg, File inputFile, | ||||
File workingDir, Project project, | |||||
File workingDir, Project p, | |||||
Properties properties) { | Properties properties) { | ||||
Hashtable xmlproperties = project.getProperties(); | |||||
Hashtable xmlproperties = p.getProperties(); | |||||
// Every key identified by the Properties must have been loaded. | // Every key identified by the Properties must have been loaded. | ||||
Enumeration propertyKeyEnum = properties.propertyNames(); | Enumeration propertyKeyEnum = properties.propertyNames(); | ||||
while(propertyKeyEnum.hasMoreElements()){ | while(propertyKeyEnum.hasMoreElements()){ | ||||
@@ -202,7 +202,7 @@ public class XmlPropertyTest extends BuildFileTest { | |||||
// We don't have an adequate way of testing the actual | // We don't have an adequate way of testing the actual | ||||
// *value* of the Path object, though... | // *value* of the Path object, though... | ||||
String id = currentKey; | String id = currentKey; | ||||
Object obj = project.getReferences().get(id); | |||||
Object obj = p.getReferences().get(id); | |||||
if ( obj == null ) { | if ( obj == null ) { | ||||
fail(assertMsg + " Object ID does not exist."); | fail(assertMsg + " Object ID does not exist."); | ||||
@@ -55,7 +55,6 @@ public class DependTest extends BuildFileTest { | |||||
* Test direct dependency removal | * Test direct dependency removal | ||||
*/ | */ | ||||
public void testDirect() { | public void testDirect() { | ||||
Project project = getProject(); | |||||
executeTarget("testdirect"); | executeTarget("testdirect"); | ||||
Hashtable files = getResultFiles(); | Hashtable files = getResultFiles(); | ||||
assertEquals("Depend did not leave correct number of files", 3, | assertEquals("Depend did not leave correct number of files", 3, | ||||
@@ -70,7 +69,6 @@ public class DependTest extends BuildFileTest { | |||||
* Test dependency traversal (closure) | * Test dependency traversal (closure) | ||||
*/ | */ | ||||
public void testClosure() { | public void testClosure() { | ||||
Project project = getProject(); | |||||
executeTarget("testclosure"); | executeTarget("testclosure"); | ||||
Hashtable files = getResultFiles(); | Hashtable files = getResultFiles(); | ||||
assertEquals("Depend did not leave correct number of files", 2, | assertEquals("Depend did not leave correct number of files", 2, | ||||
@@ -83,7 +81,6 @@ public class DependTest extends BuildFileTest { | |||||
* Test that inner class dependencies trigger deletion of the outer class | * Test that inner class dependencies trigger deletion of the outer class | ||||
*/ | */ | ||||
public void testInner() { | public void testInner() { | ||||
Project project = getProject(); | |||||
executeTarget("testinner"); | executeTarget("testinner"); | ||||
assertEquals("Depend did not leave correct number of files", 0, | assertEquals("Depend did not leave correct number of files", 0, | ||||
getResultFiles().size()); | getResultFiles().size()); | ||||
@@ -94,7 +91,6 @@ public class DependTest extends BuildFileTest { | |||||
* the outer class | * the outer class | ||||
*/ | */ | ||||
public void testInnerInner() { | public void testInnerInner() { | ||||
Project project = getProject(); | |||||
executeTarget("testinnerinner"); | executeTarget("testinnerinner"); | ||||
assertEquals("Depend did not leave correct number of files", 0, | assertEquals("Depend did not leave correct number of files", 0, | ||||
getResultFiles().size()); | getResultFiles().size()); | ||||
@@ -123,7 +119,7 @@ public class DependTest extends BuildFileTest { | |||||
* fileset | * fileset | ||||
*/ | */ | ||||
private Hashtable getResultFiles() { | private Hashtable getResultFiles() { | ||||
FileSet resultFileSet = (FileSet)project.getReference(RESULT_FILESET); | |||||
FileSet resultFileSet = (FileSet) project.getReference(RESULT_FILESET); | |||||
DirectoryScanner scanner = resultFileSet.getDirectoryScanner(project); | DirectoryScanner scanner = resultFileSet.getDirectoryScanner(project); | ||||
String[] scannedFiles = scanner.getIncludedFiles(); | String[] scannedFiles = scanner.getIncludedFiles(); | ||||
Hashtable files = new Hashtable(); | Hashtable files = new Hashtable(); | ||||
@@ -139,7 +135,6 @@ public class DependTest extends BuildFileTest { | |||||
* deleted | * deleted | ||||
*/ | */ | ||||
public void testInnerClosure() { | public void testInnerClosure() { | ||||
Project project = getProject(); | |||||
executeTarget("testinnerclosure"); | executeTarget("testinnerclosure"); | ||||
assertEquals("Depend did not leave correct number of files", 4, | assertEquals("Depend did not leave correct number of files", 4, | ||||
getResultFiles().size()); | getResultFiles().size()); | ||||
@@ -61,7 +61,7 @@ public class XMLFormatterWithCDATAOnSystemOut extends BuildFileTest { | |||||
FileReader reader = null; | FileReader reader = null; | ||||
try { | try { | ||||
reader = new FileReader(f); | reader = new FileReader(f); | ||||
String content = FileUtils.newFileUtils().readFully(reader); | |||||
String content = FileUtils.readFully(reader); | |||||
assertTrue(content.indexOf("</RESPONSE>]]>" | assertTrue(content.indexOf("</RESPONSE>]]>" | ||||
+ "</ERROR>") > 0); | + "</ERROR>") > 0); | ||||
} finally { | } finally { | ||||
@@ -30,7 +30,6 @@ import org.apache.tools.ant.types.Path; | |||||
*/ | */ | ||||
public class SOSTest extends BuildFileTest { | public class SOSTest extends BuildFileTest { | ||||
private Project project; | |||||
private Commandline commandline; | private Commandline commandline; | ||||
private static final String VSS_SERVER_PATH = "\\\\server\\vss\\srcsafe.ini"; | private static final String VSS_SERVER_PATH = "\\\\server\\vss\\srcsafe.ini"; | ||||
@@ -35,7 +35,6 @@ import org.apache.tools.ant.types.Path; | |||||
*/ | */ | ||||
public class MSVSSTest extends BuildFileTest implements MSVSSConstants { | public class MSVSSTest extends BuildFileTest implements MSVSSConstants { | ||||
private Project project; | |||||
private Commandline commandline; | private Commandline commandline; | ||||
private static final String VSS_SERVER_PATH = "\\\\server\\vss\\srcsafe.ini"; | private static final String VSS_SERVER_PATH = "\\\\server\\vss\\srcsafe.ini"; | ||||
@@ -330,7 +330,6 @@ public class ModifiedSelectorTest extends BaseSelectorTest { | |||||
/** Checks whether a cache file is created. */ | /** Checks whether a cache file is created. */ | ||||
public void testCreatePropertiesCacheDirect() { | public void testCreatePropertiesCacheDirect() { | ||||
File basedir = getSelector().getProject().getBaseDir(); | |||||
File cachefile = new File(basedir, "cachefile.properties"); | File cachefile = new File(basedir, "cachefile.properties"); | ||||
PropertiesfileCache cache = new PropertiesfileCache(); | PropertiesfileCache cache = new PropertiesfileCache(); | ||||
@@ -348,7 +347,6 @@ public class ModifiedSelectorTest extends BaseSelectorTest { | |||||
/** Checks whether a cache file is created. */ | /** Checks whether a cache file is created. */ | ||||
public void testCreatePropertiesCacheViaModifiedSelector() { | public void testCreatePropertiesCacheViaModifiedSelector() { | ||||
File basedir = getSelector().getProject().getBaseDir(); | |||||
File cachefile = new File(basedir, "cachefile.properties"); | File cachefile = new File(basedir, "cachefile.properties"); | ||||
try { | try { | ||||
@@ -826,7 +824,6 @@ public class ModifiedSelectorTest extends BaseSelectorTest { | |||||
public void doScenarioTest(String target, String cachefilename) { | public void doScenarioTest(String target, String cachefilename) { | ||||
BFT bft = new BFT(); | BFT bft = new BFT(); | ||||
bft.setUp(); | bft.setUp(); | ||||
File basedir = bft.getProject().getBaseDir(); | |||||
File cachefile = new File(basedir, cachefilename); | File cachefile = new File(basedir, cachefilename); | ||||
try { | try { | ||||
// do the actions | // do the actions | ||||