sample_built.py
""" DPDK Test suite. Test sample_built. """ import utils import string import time import re from test_case import TestCase class TestSamplebuilt(TestCase): def set_up_all(self): """ Run at the start of each test suite. """ pass def set_up(self): """ Run before each test case. """ pass def test_sample_built(self): """ Verify netmap compatibility with one port """ verify_info = ['error','Stop','terminate','No such file'] examples = self.dut.send_expect("ls examples/","#",60) ''' 'bbdev_app bond cmdline distributor ethtool\teventdev_pipeline exception_path flow_classify flow_filtering helloworld ip_fragmentation\tip_pipeline ip_reassembly
ipsec-secgw ipv4_multicast kni l2fwd l2fwd-cat\tl2fwd-crypto l2fwd-jobstats l2fwd-keepalive l3fwd l3fwd-acl l3fwd-power l3fwd-vf\tlink_status_interrupt load_balancer
Makefile\tmeson.build multi_process netmap_compat packet_ordering performance-thread\tptpclient qos_meter qos_sched quota_watermark rxtx_callbacks server_node_efd
service_cores skeleton tep_termination timer vdpa vhost vhost_crypto vhost_scsi vmdq vmdq_dcb vm_power_manager' ''' samples = examples.split() ''' ['bbdev_app', 'bond', 'cmdline', 'distributor', 'ethtool', 'eventdev_pipeline', 'exception_path', 'flow_classify', 'flow_filtering', 'helloworld', 'ip_fragmentation', 'ip_pipeline',
'ip_reassembly', 'ipsec-secgw', 'ipv4_multicast', 'kni', 'l2fwd', 'l2fwd-cat', 'l2fwd-crypto', 'l2fwd-jobstats', 'l2fwd-keepalive', 'l3fwd', 'l3fwd-acl', 'l3fwd-power', 'l3fwd-vf',
'link_status_interrupt', 'load_balancer', 'Makefile', 'meson.build', 'multi_process', 'netmap_compat', 'packet_ordering', 'performance-thread', 'ptpclient', 'qos_meter', 'qos_sched',
'quota_watermark', 'rxtx_callbacks', 'server_node_efd', 'service_cores', 'skeleton', 'tep_termination', 'timer', 'vdpa', 'vhost', 'vhost_crypto', 'vhost_scsi', 'vmdq', 'vmdq_dcb', 'vm_power_manager'] ''' samples.remove('Makefile') results = [] for sample in samples: if 'l2fwd-cat' == sample: self.dut.send_expect('export PQOS_INSTALL_PATH=/root/intel-cmt-cat-master/lib','#',60) out = self.dut.build_dpdk_apps("./examples/%s" % sample) for info in verify_info: if info in out: results.append(sample) results = list(set(results)) self.verify(results == [], "sample built failed %s" % results) def tear_down(self): """ Run after each test case. """ pass def tear_down_all(self): """ Run after each test suite. """ pass