"""This script is used to create image"""
+import re
import os
import sys
import shutil
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