diff --git a/Tools/autotest/examples.py b/Tools/autotest/examples.py index 6f65eb5764..de4c1cc209 100644 --- a/Tools/autotest/examples.py +++ b/Tools/autotest/examples.py @@ -1,6 +1,7 @@ from __future__ import print_function import os +import pexpect import signal import subprocess import time @@ -43,6 +44,22 @@ def run_example(filepath, valgrind=False, gdb=False): def run_examples(debug=False, valgrind=False, gdb=False): dirpath = util.reltopdir(os.path.join('build', 'linux', 'examples')) + print("Running Hello") + # explicitly run helloworld and check for output + hello_path = os.path.join(dirpath, "Hello") + p = pexpect.spawn(hello_path, ["Hello"]) + ex = None + try: + p.expect("hello world", timeout=5) + except pexpect.TIMEOUT as e: + ex = e + print("ran Hello") + + p.close() + + if ex is not None: + raise ex + skip = { "BARO_generic": "Most linux computers don't have baros...", "RCProtocolDecoder": "This assumes specific hardware is connected",