NetAnim: provide unlink for test artifact
authorJohn Abraham <john.abraham@gatech.edu>
Sun, 20 May 2012 19:59:21 -0700
changeset 8778 bf37816b37ad
parent 8777 a3f5bc70cf28
child 8783 c21471f83747
NetAnim: provide unlink for test artifact
src/netanim/model/animation-interface.cc
src/netanim/test/netanim-test.cc
--- a/src/netanim/model/animation-interface.cc	Sun May 20 15:03:46 2012 -0700
+++ b/src/netanim/model/animation-interface.cc	Sun May 20 19:59:21 2012 -0700
@@ -148,7 +148,7 @@
       m_outputFileSet = true;
       return true;
     }
-  NS_LOG_UNCOND (fn.c_str ());
+  NS_LOG_INFO ("Creating new trace file:" << fn.c_str ());
   FILE* f = fopen (fn.c_str (), "w");
   if (!f)
     {
--- a/src/netanim/test/netanim-test.cc	Sun May 20 15:03:46 2012 -0700
+++ b/src/netanim/test/netanim-test.cc	Sun May 20 19:59:21 2012 -0700
@@ -101,6 +101,7 @@
   FILE * fp = fopen (traceFileName.c_str (), "r");
   NS_TEST_ASSERT_MSG_NE (fp, 0, "Trace file was not created");
   fclose (fp);
+  unlink (traceFileName.c_str ());
   Simulator::Destroy ();
 }