test: test buildroot read_with_timeout function

- Added a new stage that is stuck in an infinite loop
- Added two tests that use this stage and force a timeout
This commit is contained in:
AaronH88 2021-11-29 13:47:49 +00:00 committed by Tom Gundersen
parent cd8f8681ad
commit 99c739fd60
2 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,20 @@
#!/usr/bin/python3
"""
Test stage that is used for timeout tests
"""
import time
import sys
def main():
print('Test stage output.')
while True:
time.sleep(2)
return 0
if __name__ == '__main__':
r = main()
sys.exit(r)