From efd8b1a4c13bff978c43d1f30af455011ae5af0f Mon Sep 17 00:00:00 2001 From: wisberg Date: Wed, 7 May 2003 03:58:04 +0000 Subject: [PATCH] staging was not being written to XML. --- .../testing/harness/bridge/AbstractRunSpec.java | 12 +++++++++++- .../org/aspectj/testing/harness/bridge/AjcTest.java | 8 +++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/testing/src/org/aspectj/testing/harness/bridge/AbstractRunSpec.java b/testing/src/org/aspectj/testing/harness/bridge/AbstractRunSpec.java index 3b6356bca..1a8b1f843 100644 --- a/testing/src/org/aspectj/testing/harness/bridge/AbstractRunSpec.java +++ b/testing/src/org/aspectj/testing/harness/bridge/AbstractRunSpec.java @@ -613,6 +613,9 @@ abstract public class AbstractRunSpec implements IRunSpec { // XXX use MessageHa && !LangUtil.isEmpty(comment)) { out.printAttribute(xmlNames.commentName, comment); } + if (isStaging && !LangUtil.isEmpty(xmlNames.stagingName)) { + out.printAttribute(xmlNames.commentName, comment); + } } /** @@ -733,16 +736,20 @@ abstract public class AbstractRunSpec implements IRunSpec { // XXX use MessageHa public static class XMLNames { public static final XMLNames DEFAULT = new XMLNames(null, "description", "sourceLocation", - "keywords", "options", "paths", "comment", false, false, false); + "keywords", "options", "paths", "comment", + "staging", false, false, false); final String descriptionName; final String sourceLocationName; final String keywordsName; final String optionsName; final String pathsName; final String commentName; + final String stagingName; final boolean skipDirChanges; final boolean skipMessages; final boolean skipChildren; + // not runtime, skipAll, skipIfAnyChildSkipped, skipSet + // sourceLocations /** reset all names/behavior or pass defaultNames * as the defaults for any null elements */ @@ -753,6 +760,7 @@ abstract public class AbstractRunSpec implements IRunSpec { // XXX use MessageHa String optionsName, String pathsName, String commentName, + String stagingName, boolean skipDirChanges, boolean skipMessages, boolean skipChildren) { @@ -766,6 +774,7 @@ abstract public class AbstractRunSpec implements IRunSpec { // XXX use MessageHa this.optionsName = (null != optionsName ? optionsName : defaultNames.optionsName); this.pathsName = (null != pathsName ? pathsName : defaultNames.pathsName); this.commentName = (null != commentName ? commentName : defaultNames.commentName); + this.stagingName = (null != stagingName ? stagingName : defaultNames.stagingName); } else { this.descriptionName = descriptionName; this.sourceLocationName = sourceLocationName; @@ -773,6 +782,7 @@ abstract public class AbstractRunSpec implements IRunSpec { // XXX use MessageHa this.optionsName = optionsName; this.pathsName = pathsName; this.commentName = commentName; + this.stagingName = stagingName; } } } diff --git a/testing/src/org/aspectj/testing/harness/bridge/AjcTest.java b/testing/src/org/aspectj/testing/harness/bridge/AjcTest.java index 8f9afefe6..95fe203dc 100644 --- a/testing/src/org/aspectj/testing/harness/bridge/AjcTest.java +++ b/testing/src/org/aspectj/testing/harness/bridge/AjcTest.java @@ -85,11 +85,12 @@ public class AjcTest extends RunSpecIterator { /** * do description as title, do sourceLocation, * do keywords, do options, skip paths, do comment, + * skip staging, * skip dirChanges, do messages and do children * (though we do children directly). */ private static final XMLNames NAMES = new XMLNames(XMLNames.DEFAULT, - "title", null, null, null, "", null, true, false, false); + "title", null, null, null, "", null, "", true, false, false); private static final String OPTION_PREFIX = "-ajctest"; private static final String[] VALID_OPTIONS = new String[] { OPTION_PREFIX }; @@ -313,12 +314,13 @@ public class AjcTest extends RunSpecIterator { public static final String XMLNAME = "suite"; /** * do description, do sourceLocation, - * do keywords, do options, skip paths, do comment + * do keywords, do options, skip paths, do comment, + * skip staging, * skip dirChanges, skip messages and do children * (though we do children directly). */ private static final XMLNames NAMES = new XMLNames(XMLNames.DEFAULT, - null, null, null, null, "", null, true, true, false); + null, null, null, null, "", null, "", true, true, false); File suiteDir; public Spec() { super(XMLNAME, false); // do not skip this even if children skip -- 2.39.5