From 3ef23bf8bf6b9f9bb59de4289658f3f81da63435 Mon Sep 17 00:00:00 2001 From: imarom Date: Mon, 9 May 2016 16:44:10 +0300 Subject: PCAP remote gtests --- src/gtest/trex_stateless_gtest.cpp | 64 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'src/gtest') 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: -- cgit 1.2.3-korg