about summary refs log tree commit diff stats
path: root/020run.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-07-09 14:25:48 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-07-09 14:25:48 -0700
commit6573fe1f1aa6d87c027d10429ded7e0162e52902 (patch)
treeddd110af3e987e49bb60ba05c16833c92d6d8901 /020run.cc
parent6ff9413c5dc624df6a33d7680a6667c27cd9352e (diff)
downloadmu-6573fe1f1aa6d87c027d10429ded7e0162e52902.tar.gz
3965 - get rid of the teardown() function
Instead of setup() and teardown() we'll just use a reset() function from
now on, which will bring the machine back to a good state before each
test or run, and also before exit (to avoid memory leaks).
Diffstat (limited to '020run.cc')
-rw-r--r--020run.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/020run.cc b/020run.cc
index ed364b37..b059224e 100644
--- a/020run.cc
+++ b/020run.cc
@@ -208,7 +208,7 @@ save_snapshots();
 :(before "End Main")
 if (!Run_tests && contains_key(Recipe_ordinal, "main") && contains_key(Recipe, get(Recipe_ordinal, "main"))) {
   // Running Main
-  setup();
+  reset();
   if (Start_tracing) {
     Trace_stream = new trace_stream;
     Save_trace = true;
@@ -216,7 +216,6 @@ if (!Run_tests && contains_key(Recipe_ordinal, "main") && contains_key(Recipe, g
   trace(2, "run") << "=== Starting to run" << end();
   assert(Num_calls_to_transform_all == 1);
   run_main(argc, argv);
-  teardown();
 }
 :(code)
 void run_main(int argc, char* argv[]) {