sanitycheck: additional scripting hook after flashing
Support custom hooks after flashing is completed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/scripts/sanitycheck b/scripts/sanitycheck
index 832f97e..0544d96 100755
--- a/scripts/sanitycheck
+++ b/scripts/sanitycheck
@@ -777,6 +777,7 @@
start_time = time.time()
pre_script = hardware.get('pre_script')
+ post_flash_script = hardware.get('post_flash_script')
post_script = hardware.get('post_script')
if pre_script:
@@ -810,6 +811,10 @@
except subprocess.CalledProcessError:
os.write(write_pipe, b'x') # halt the thread
+ if post_flash_script:
+ self.run_custom_script(post_flash_script, 30)
+
+
t.join(self.timeout)
if t.is_alive():
logger.debug("Timed out while monitoring serial output on {}".format(self.instance.platform.name))