Added more error check on validation to let result be more exact.
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 28 Jul 2006 06:33:01 +0000 (06:33 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 28 Jul 2006 06:33:01 +0000 (06:33 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1138 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/SurfaceArea/build.xml

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