about summary refs log tree commit diff stats
path: root/050scenario.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-07-05 00:53:12 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-07-05 00:53:12 -0700
commitf28f2636c6707e1a33bebacafd0486f4965978ea (patch)
treeeba4edbcbf6cd4ad1e14b9629613003bf224c3f1 /050scenario.cc
parent7e85c3362ce7e34165d90695fb86d3e421837fe8 (diff)
downloadmu-f28f2636c6707e1a33bebacafd0486f4965978ea.tar.gz
3101 - purge .traces/ dir from repo history
I'd been toying with this idea for some time now given how large the
repo had been growing. The final straw was noticing that people cloning
the repo were having to wait *5 minutes*! That's not good, particularly
for a project with 'tiny' in its description. After purging .traces/
clone time drops to 7 seconds in my tests.

Major issue: some commits refer to .traces/ but don't really change
anything there. That could get confusing :/

Minor issues:

a) I've linked inside commits on GitHub like a half-dozen times online
or over email. Those links are now liable to eventually break. (I seem
to recall GitHub keeps them around as long as they get used at least
once every 60 days, or something like that.)

b) Numbering of commits is messed up because some commits only had
changes to the .traces/ sub-directory.
Diffstat (limited to '050scenario.cc')
-rw-r--r--050scenario.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/050scenario.cc b/050scenario.cc
index 8a9a57d4..b177cab9 100644
--- a/050scenario.cc
+++ b/050scenario.cc
@@ -145,7 +145,6 @@ void run_mu_scenario(const scenario& s) {
   bool not_already_inside_test = !Trace_stream;
 //?   cerr << s.name << '\n';
   if (not_already_inside_test) {
-    Trace_file = s.name;
     Trace_stream = new trace_stream;
     setup();
   }
@@ -161,12 +160,13 @@ void run_mu_scenario(const scenario& s) {
   // End Mu Test Teardown
   if (not_already_inside_test && Trace_stream) {
     teardown();
-    ofstream fout((Trace_dir+Trace_file).c_str());
-    fout << Trace_stream->readable_contents("");
-    fout.close();
+    if (Save_trace) {
+      ofstream fout("last_trace");
+      fout << Trace_stream->readable_contents("");
+      fout.close();
+    }
     delete Trace_stream;
     Trace_stream = NULL;
-    Trace_file = "";
   }
   Current_scenario = NULL;
 }