diff options
author | wisberg <wisberg> | 2005-03-08 07:36:28 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2005-03-08 07:36:28 +0000 |
commit | 07cea8cd5891580ab0dae9fd006c8d751f6437f9 (patch) | |
tree | a62ce31e2e55de35b1e3bbb848315de2b9ee5a64 /build | |
parent | 5933735d9a87e59c5c89267d18f33ae09c56206c (diff) | |
download | aspectj-07cea8cd5891580ab0dae9fd006c8d751f6437f9.tar.gz aspectj-07cea8cd5891580ab0dae9fd006c8d751f6437f9.zip |
some cleanup, removed test - antecedants no longer pre-clipped
Diffstat (limited to 'build')
-rw-r--r-- | build/testsrc/org/aspectj/internal/build/BuildModuleTest.java | 43 |
1 files changed, 10 insertions, 33 deletions
diff --git a/build/testsrc/org/aspectj/internal/build/BuildModuleTest.java b/build/testsrc/org/aspectj/internal/build/BuildModuleTest.java index 8c4ca2bc9..295ee1e83 100644 --- a/build/testsrc/org/aspectj/internal/build/BuildModuleTest.java +++ b/build/testsrc/org/aspectj/internal/build/BuildModuleTest.java @@ -22,13 +22,11 @@ import org.apache.tools.ant.types.Commandline.Argument; import org.aspectj.internal.tools.ant.taskdefs.*; import org.aspectj.internal.tools.ant.taskdefs.BuildModule; import org.aspectj.internal.tools.build.*; -import org.aspectj.internal.tools.build.Modules; import java.io.File; import java.util.ArrayList; import java.util.Iterator; -//import junit.framework.*; import junit.framework.TestCase; /** @@ -44,13 +42,15 @@ import junit.framework.TestCase; */ public class BuildModuleTest extends TestCase { + private static boolean printInfoMessages = false; private static boolean printedMessage; // skip those requiring ajdoc, which requires tools.jar // also skip those requiring java5 unless manually set up private static final String[] SKIPS - = {"ajbrowser", "aspectjtools", "ajdoc", "aspectj5rt"}; + = {"aspectjtools", "ajdoc", "aspectj5rt"}; private static final String SKIP_MESSAGE = - "Define \"run.build.tests\" as a system property to run tests to build "; + "BuildModuleTest: Define \"run.build.tests\" as a system " + + "property to run tests to build "; private static final String BUILD_CONFIG; static { String config = null; @@ -60,7 +60,9 @@ public class BuildModuleTest extends TestCase { // ignore } BUILD_CONFIG = config; - System.out.println("BuildModuleTest build.config: " + config); + if (printInfoMessages) { + System.out.println("BuildModuleTest build.config: " + config); + } } ArrayList tempFiles = new ArrayList(); @@ -147,32 +149,6 @@ public class BuildModuleTest extends TestCase { checkBuildProduct(productDir, baseDir, distDir, jarDir); } - public void testModuleAntecedantsClipped() { - checkAntClipping("testing-drivers", true); - checkAntClipping("taskdefs", false); - } - - void checkAntClipping(String moduleName, boolean expectAnt) { - File baseDir = new File("..").getAbsoluteFile(); - File jarDir = getJarDir().getAbsoluteFile(); - Messager handler = new Messager(); - Modules modules = new Modules(baseDir, jarDir, false, handler); - Module td = modules.getModule(moduleName); - ArrayList list = td.findKnownJarAntecedants(); - // should include ant - boolean gotAnt = false; - for (Iterator iter = list.iterator(); iter.hasNext();) { - File lib = (File) iter.next(); - if (lib.getPath().endsWith("ant.jar")) { - gotAnt = true; - break; - } - } - String label = (expectAnt ? "expected" : "not expecting") - + " ant in antecedants for " - + moduleName; - assertTrue(label, expectAnt == gotAnt); - } void checkBuildProduct(File productDir, File baseDir, File distDir, File jarDir) { if (!shouldBuild(productDir.getPath())) { @@ -252,7 +228,9 @@ public class BuildModuleTest extends TestCase { } for (int i = 0; i < SKIPS.length; i++) { if (SKIPS[i].equals(target)) { - System.err.println(target + " expressly skipped..."); + if (printInfoMessages) { + System.err.println(target + " skipped build test [" + getClass().getName() + ".shouldBuild(..)]"); + } return false; } } @@ -282,7 +260,6 @@ public class BuildModuleTest extends TestCase { task.execute(); jar = new File(getJarDir(), module + "-all.jar"); assertTrue("cannot read " + jar, jar.canRead()); - // verify if possible if (null == classname) { return; |