summaryrefslogtreecommitdiffstats
path: root/src/gtest
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-05-09 16:44:10 +0300
committerimarom <imarom@cisco.com>2016-05-09 16:48:17 +0300
commit3ef23bf8bf6b9f9bb59de4289658f3f81da63435 (patch)
tree5d729805f53f5541d0e99380f6967efd633fbd68 /src/gtest
parentc4e6748cedf1f9f3a3c1916c96c4f044561b075b (diff)
PCAP remote gtests
Diffstat (limited to 'src/gtest')
-rw-r--r--src/gtest/trex_stateless_gtest.cpp64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/gtest/trex_stateless_gtest.cpp b/src/gtest/trex_stateless_gtest.cpp
index a5cf3307..ef7b658d 100644
--- a/src/gtest/trex_stateless_gtest.cpp
+++ b/src/gtest/trex_stateless_gtest.cpp
@@ -3569,6 +3569,70 @@ TEST_F(basic_stl, vm_split_client_var) {
}
+TEST_F(basic_stl, pcap_remote_basic) {
+
+ CBasicStl t1;
+ CParserOption * po =&CGlobalInfo::m_options;
+ po->preview.setVMode(7);
+ po->preview.setFileWrite(true);
+ po->out_file ="exp/pcap_remote_basic";
+
+ TrexStatelessCpToDpMsgBase *push_msg = new TrexStatelessDpPushPCAP(0,
+ 0,
+ "exp/remote_test.cap",
+ 10,
+ 1,
+ 1,
+ -1);
+ t1.m_msg = push_msg;
+
+ bool res = t1.init();
+ EXPECT_EQ_UINT32(1, res?1:0)<< "pass";
+}
+
+TEST_F(basic_stl, pcap_remote_loop) {
+
+ CBasicStl t1;
+ CParserOption * po =&CGlobalInfo::m_options;
+ po->preview.setVMode(7);
+ po->preview.setFileWrite(true);
+ po->out_file ="exp/pcap_remote_loop";
+
+ TrexStatelessCpToDpMsgBase *push_msg = new TrexStatelessDpPushPCAP(0,
+ 0,
+ "exp/remote_test.cap",
+ 1,
+ 1,
+ 3,
+ -1);
+ t1.m_msg = push_msg;
+
+ bool res = t1.init();
+ EXPECT_EQ_UINT32(1, res?1:0)<< "pass";
+}
+
+TEST_F(basic_stl, pcap_remote_duration) {
+
+ CBasicStl t1;
+ CParserOption * po =&CGlobalInfo::m_options;
+ po->preview.setVMode(7);
+ po->preview.setFileWrite(true);
+ po->out_file ="exp/pcap_remote_duration";
+
+ TrexStatelessCpToDpMsgBase *push_msg = new TrexStatelessDpPushPCAP(0,
+ 0,
+ "exp/remote_test.cap",
+ 100000,
+ 1,
+ 0,
+ 0.5);
+ t1.m_msg = push_msg;
+
+ bool res = t1.init();
+ EXPECT_EQ_UINT32(1, res?1:0)<< "pass";
+}
+
+
/********************************************* Itay Tests End *************************************/
class rx_stat_pkt_parse : public testing::Test {
protected: