File: test_relpkt_basic.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 (23 lines) | stat: -rw-r--r-- 855 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
22
23
#
#  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 relpkt over msgdelim over serial")
check_pipe_dev()
io1 = alloc_io(o, "mux(mode=server),relpkt(mode=server),msgdelim,serialdev," + ttypipe[0] + ",hangup-when-done", do_open = False)
io2 = alloc_io(o, "mux,relpkt,msgdelim,serialdev," + ttypipe[1] + ",hangup-when-done", do_open = False)
TestConCon(o, io1, io2, do_test, "relpkt1",
        expected_raddr1 = ttypipe[0] + ",9600N81 RTSHI DTRHI",
        expected_raddr1b = ttypipe[0] + ",9600N81,HANGUP_WHEN_DONE RTSHI DTRHI",
        expected_raddr2 = ttypipe[1] + ",9600N81 RTSHI DTRHI",
        expected_raddr2b = ttypipe[1] + ",9600N81,HANGUP_WHEN_DONE RTSHI DTRHI")
del io1
del io2
del o
test_shutdown()