Added code to fail the SAVerify command when validation failed
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 26 Jul 2006 08:24:17 +0000 (08:24 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 26 Jul 2006 08:24:17 +0000 (08:24 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1099 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/SurfaceArea/build.xml

index 703673b..7e63683 100644 (file)
@@ -100,7 +100,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     -->\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
+          outputproperty="XMLBEANS_OUTPUT"\r
+          resultproperty="XMLBEANS_RESULT"\r
+          errorproperty="XMLBEANS_ERROR">\r
           \r
       <classpath refid="classpath"/>\r
       <arg value="-dl"/>\r
@@ -110,7 +112,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     </java>   \r
 \r
     <delete file="${SURFACE_AREA_FILE}.xml" quiet="true"/>\r
-    <echo message="Result ... ${XMLBEANS_OUTPUT}"/>\r
+    <if>\r
+      <contains string="${XMLBEANS_OUTPUT}" substring="NOT valid"/>\r
+      <then>\r
+        <fail message="Result ... ${XMLBEANS_OUTPUT}"/>\r
+      </then>\r
+      <else>\r
+        <echo message="Result ... ${XMLBEANS_OUTPUT}"/>\r
+      </else>\r
+    </if>\r
   </target>\r
   \r
   <!--\r