1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
#
# gensio - A library for abstracting stream I/O
# Copyright (C) 2018 Corey Minyard <minyard@acm.org>
#
# SPDX-License-Identifier: GPL-2.0-only
#
from utils import *
import gensio
print("Test echo device")
check_echo_dev()
io = alloc_io(o, "serialdev," + ttyecho + ",38400,hangup-when-done")
check_raddr(io, "echo device", ttyecho + ",38400N81 RTSHI DTRHI",
ttyecho + ",38400N81,HANGUP_WHEN_DONE RTSHI DTRHI")
test_dataxfer(io, io, "This is a test string!")
io_close([io])
del io
del o
test_shutdown()
print(" Success!")
|