forked from dgubanovv/qa-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ptp_virtual_avb_iperf.py
53 lines (35 loc) · 2.25 KB
/
ptp_virtual_avb_iperf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import os
import sys
import pytest
from tools import constants
from tools import macos_ptp_avb_base
from tools.macos_ptp_avb_base import AVB_SOURCE_VIRTUAL_AUDIO
def setup_module(module):
# import tools._test_setup # uncomment for manual test setup
os.environ["TEST"] = "ptp_virtual_avb_iperf"
class TestPtpIperfBidirectional(macos_ptp_avb_base.TestMacPtpAvbBackToBack):
def test_ptp_avb_roles_100M_virtual_avb(self):
self.check_roles(*self.ptp_avb_bidir_get_log(constants.LINK_SPEED_100M, AVB_SOURCE_VIRTUAL_AUDIO, bg_iperf=True))
def test_ptp_avb_pdelays_100M_virtual_avb(self):
self.check_delays(*self.ptp_avb_bidir_get_log(constants.LINK_SPEED_100M, AVB_SOURCE_VIRTUAL_AUDIO, bg_iperf=True))
def test_ptp_avb_roles_1G_virtual_avb(self):
self.check_roles(*self.ptp_avb_bidir_get_log(constants.LINK_SPEED_1G, AVB_SOURCE_VIRTUAL_AUDIO, bg_iperf=True))
def test_ptp_avb_pdelays_1G_virtual_avb(self):
self.check_delays(*self.ptp_avb_bidir_get_log(constants.LINK_SPEED_1G, AVB_SOURCE_VIRTUAL_AUDIO, bg_iperf=True))
def test_ptp_avb_roles_2_5G_virtual_avb(self):
self.check_roles(*self.ptp_avb_bidir_get_log(constants.LINK_SPEED_2_5G, AVB_SOURCE_VIRTUAL_AUDIO, bg_iperf=True))
def test_ptp_avb_pdelays_2_5G_virtual_avb(self):
self.check_delays(*self.ptp_avb_bidir_get_log(constants.LINK_SPEED_2_5G, AVB_SOURCE_VIRTUAL_AUDIO, bg_iperf=True))
def test_ptp_avb_roles_5G_virtual_avb(self):
self.check_roles(*self.ptp_avb_bidir_get_log(constants.LINK_SPEED_5G, AVB_SOURCE_VIRTUAL_AUDIO, bg_iperf=True))
def test_ptp_avb_pdelays_5G_virtual_avb(self):
self.check_delays(*self.ptp_avb_bidir_get_log(constants.LINK_SPEED_5G, AVB_SOURCE_VIRTUAL_AUDIO, bg_iperf=True))
def test_ptp_avb_roles_10G_virtual_avb(self):
self.check_roles(*self.ptp_avb_bidir_get_log(constants.LINK_SPEED_10G, AVB_SOURCE_VIRTUAL_AUDIO, bg_iperf=True))
def test_ptp_avb_pdelays_10G_virtual_avb(self):
self.check_delays(*self.ptp_avb_bidir_get_log(constants.LINK_SPEED_10G, AVB_SOURCE_VIRTUAL_AUDIO, bg_iperf=True))
if __name__ == "__main__":
exec_list = [__file__, "-s", "-v"]
if sys.argv:
exec_list.append("-k {}".format(sys.argv[1]))
pytest.main(exec_list)