Perform Tests on the images built successfully.
authorIgor Stoppa <igor.stoppa@intel.com>
Tue, 6 May 2014 10:30:20 +0000 (13:30 +0300)
committerLin A Yang <lin.a.yang@intel.com>
Thu, 8 May 2014 02:46:35 +0000 (05:46 +0300)
Change-Id: I7c621e8f0020688810b42c2e22e92e88f1e8e0aa

job_imager.py

index 6c315be..c6aaa8e 100755 (executable)
@@ -2,6 +2,7 @@
 
 """This script is used to create image"""
 
+import re
 import os
 import sys
 import shutil
@@ -159,6 +160,22 @@ def main():
         trigger_next("POST-IMAGE-CREATION", data)
 
     if status == 'success':
+        print "The build was successful."
+
+        # XXX HACK:
+        # the following test is needed atm because BOSS generates
+        # seemgly good ivi images even if the target is "emulator"
+        # this must be cleaned up after BOSS is whacked
+        if "emulator" in fields["images_path"]:
+            print "But this is an emulator image and it won't be tested on any HW"
+            return 0
+
+        testable_images = re.compile(os.getenv("TESTABLE_IMAGES"))
+        if testable_images.match(fields["name"]):
+            print "The target HW is supported and automated testing will follow."
+            trigger_next("IMAGE-TESTING", data)
+        else:
+            print "However the target HW is NOT supported for automated testing."
         return 0
     else:
         return -1