mirror of https://github.com/ArduPilot/ardupilot
autotest: explicitly run hello-world test and check for string
This commit is contained in:
parent
67e79638d4
commit
c44b760f3c
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue