diff options
author | Angela Czubak <aczubak@caviumnetworks.com> | 2017-04-19 14:22:10 +0200 |
---|---|---|
committer | Marvin Liu <yong.liu@intel.com> | 2017-04-20 13:24:39 +0800 |
commit | 78b9f554fd1ecac851ba183305fd9f78bdb57340 (patch) | |
tree | 43c53f834adcdb9c5be7ce4d42c1f64199dafb0f /tests | |
parent | a6a3cd24ea3ff03b5cc3a6e00399b4efb898712b (diff) |
tests: pmdpcap - modifying the right config file + importing utils after scapy
This test used to modify config/common_linuxapp or config/common_bsdapp
to compile DPDK with PCAP, however, this config may lie as well in
config/common_base. If the PCAP variable is not found in OS specific
files, then it is assumed that config/common_base should be modified.
Scapy may contain utils itself, therefore importing dts utils is moved
after importing from scapy (so as to override utils).
Signed-off-by: Angela Czubak <aczubak at caviumnetworks.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/TestSuite_pmdpcap.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/TestSuite_pmdpcap.py b/tests/TestSuite_pmdpcap.py index 0a79e96..a51eb31 100644 --- a/tests/TestSuite_pmdpcap.py +++ b/tests/TestSuite_pmdpcap.py @@ -32,10 +32,10 @@ ''' ''' from test_case import TestCase -import utils from time import sleep from scapy.all import * +import utils # @@ -73,8 +73,11 @@ class TestPmdPcap(TestCase): else: raise Exception( "Unknow os type, please check to make sure pcap can work in OS [ %s ]" % os_type) - - return config_head + config_tail + out = self.dut.send_command("cat config/%s" % (config_head + config_tail)) + if "CONFIG_RTE_LIBRTE_PMD_PCAP" in out: + return config_head + config_tail + else: + return config_head + "base" def create_pcap_file(self, filename, number_of_packets): flow = [] |