Added more error check on validation to let result be more exact.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1138 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jwang36 2006-07-28 06:33:01 +00:00
parent 57d0e52a71
commit 27169a56e6
1 changed files with 9 additions and 4 deletions

View File

@ -101,7 +101,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<copy file="${SURFACE_AREA_FILE}" tofile="${SURFACE_AREA_FILE}.xml"/> <copy file="${SURFACE_AREA_FILE}" tofile="${SURFACE_AREA_FILE}.xml"/>
<java classname="org.apache.xmlbeans.impl.tool.InstanceValidator" <java classname="org.apache.xmlbeans.impl.tool.InstanceValidator"
outputproperty="XMLBEANS_OUTPUT" outputproperty="XMLBEANS_OUTPUT"
resultproperty="XMLBEANS_RESULT"
errorproperty="XMLBEANS_ERROR"> errorproperty="XMLBEANS_ERROR">
<classpath refid="classpath"/> <classpath refid="classpath"/>
@ -113,12 +112,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<delete file="${SURFACE_AREA_FILE}.xml" quiet="true"/> <delete file="${SURFACE_AREA_FILE}.xml" quiet="true"/>
<if> <if>
<contains string="${XMLBEANS_OUTPUT}" substring="NOT valid"/> <or>
<contains string="${XMLBEANS_OUTPUT}" substring="NOT valid"/>
<contains string="${XMLBEANS_OUTPUT}" substring=": error:"/>
<contains string="${XMLBEANS_ERROR}" substring="XmlException"/>
<contains string="${XMLBEANS_ERROR}" substring=": error:"/>
</or>
<then> <then>
<fail message="Result ... ${XMLBEANS_OUTPUT}"/> <echo message="Result ... ${XMLBEANS_OUTPUT}&#x0d;&#x0a;${XMLBEANS_ERROR}"/>
<fail message="${SURFACE_AREA_FILE} is invalid!"/>
</then> </then>
<else> <else>
<echo message="Result ... ${XMLBEANS_OUTPUT}"/> <echo message="Result ... ${SURFACE_AREA_FILE} is valid"/>
</else> </else>
</if> </if>
</target> </target>