Fail the execution unless all the tests PASS
authorIgor Stoppa <igor.stoppa@intel.com>
Mon, 16 Jun 2014 10:58:17 +0000 (13:58 +0300)
committerLin A Yang <lin.a.yang@intel.com>
Mon, 7 Jul 2014 08:50:12 +0000 (11:50 +0300)
Change-Id: Iaafab2ce248701bbd1910177e2f493b814502b8a

jobs/image-tester/config.xml

index e509b91..242aa72 100644 (file)
@@ -62,7 +62,9 @@ python ${WORKSPACE}/jenkins-scripts/job_test_build.py
     <org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder plugin="groovy-postbuild@1.8">
       <groovyScript>def run = Thread.currentThread().executable
 def en = run.getEnvironment()
-manager.addShortText(&quot;Image &quot; + en[&quot;IMAGE&quot;] + &quot; - &quot; + en[&quot;TEST_RESULT&quot;])</groovyScript>
+manager.addShortText(&quot;Image &quot; + en[&quot;IMAGE&quot;] + &quot; - &quot; + en[&quot;TEST_RESULT&quot;])
+if (en["TEST_RESULT"] != "PASS")
+    manager.buildFailure()</groovyScript>
       <behavior>0</behavior>
     </org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder>
   </publishers>