sanitycheck: additional scripting hook after flashing
Support custom hooks after flashing is completed. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
4522e10d65
commit
e9450065de
2 changed files with 8 additions and 0 deletions
|
@ -27,6 +27,9 @@ sequence:
|
|||
"post_script":
|
||||
type: str
|
||||
required: false
|
||||
"post_flash_script":
|
||||
type: str
|
||||
required: false
|
||||
"pre_script":
|
||||
type: str
|
||||
required: false
|
|
@ -777,6 +777,7 @@ class DeviceHandler(Handler):
|
|||
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 @@ class DeviceHandler(Handler):
|
|||
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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue