File: test_echo_device.py

package info (click to toggle)
gensio 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,364 kB
  • sloc: ansic: 90,328; python: 5,220; sh: 4,935; cpp: 3,258; makefile: 1,418
file content (21 lines) | stat: -rw-r--r-- 541 bytes parent folder | download | duplicates (2)
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!")