[aodv] Use GetTempDir() to store pcap traces in regression tests
authorPavel Boyko <boyko@iitp.ru>
Mon, 16 Nov 2009 13:32:56 +0300
changeset 5737 9e23a1e1533f
parent 5736 995f2297bb5a
child 5738 4adee3d945ba
[aodv] Use GetTempDir() to store pcap traces in regression tests
src/routing/manet/aodv/test/aodv-regression.cc
--- a/src/routing/manet/aodv/test/aodv-regression.cc	Fri Oct 30 13:09:05 2009 +0300
+++ b/src/routing/manet/aodv/test/aodv-regression.cc	Mon Nov 16 13:32:56 2009 +0300
@@ -146,7 +146,7 @@
   p.Stop (m_time);
   
   // 4. write PCAP
-  std::string prefix = (WRITE_VECTORS ? NS_TEST_SOURCEDIR : std::string("./")) + PREFIX;
+  std::string prefix = (WRITE_VECTORS ? NS_TEST_SOURCEDIR : GetTempDir ()) + PREFIX;
   wifiPhy.EnablePcapAll (prefix);
 }
 
@@ -158,7 +158,7 @@
       std::ostringstream os1, os2;
       // File naming conventions are hard-coded here.
       os1 << NS_TEST_SOURCEDIR << PREFIX << "-" << i << "-0.pcap";
-      os2 << "./" << PREFIX << "-" << i << "-0.pcap";
+      os2 << GetTempDir () << PREFIX << "-" << i << "-0.pcap";
       
       uint32_t sec(0), usec(0);
       bool diff = PcapFile::Diff (os1.str(), os2.str(), sec, usec);