diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-19 20:48:29 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-19 20:48:29 -0700 |
commit | e4a97d87a17a8edc5a2049bdc21143695d20dcfc (patch) | |
tree | ca977789261eae4e35eac9ab36e1596489ec3ab9 /cpp/050scenario | |
parent | 4be9a93be91b4d301aa8679af5ebcba82ff2049d (diff) | |
download | mu-e4a97d87a17a8edc5a2049bdc21143695d20dcfc.tar.gz |
1104 - support 'dump' in mu scenarios
Diffstat (limited to 'cpp/050scenario')
-rw-r--r-- | cpp/050scenario | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cpp/050scenario b/cpp/050scenario index c51afa59..8dd734c5 100644 --- a/cpp/050scenario +++ b/cpp/050scenario @@ -3,6 +3,7 @@ :(before "End Types") struct scenario { string name; + string dump_layer; string to_run; map<int, int> memory_expectations; // End scenario Fields @@ -18,10 +19,8 @@ for (size_t i = 0; i < Scenarios.size(); ++i) { setup(); Trace_file = Scenarios[i].name; START_TRACING_UNTIL_END_OF_SCOPE -//? Trace_stream->dump_layer = "all"; //? 2 -//? cout << "before: " << Memory[1] << '\n'; //? 1 -//? Trace_stream->dump_layer = "all"; //? 1 -//? cout << "Before:\n"; dump_memory(); //? 1 + if (!Scenarios[i].dump_layer.empty()) + Trace_stream->dump_layer = Scenarios[i].dump_layer; //? cout << Scenarios[i].to_run; //? 2 run(Scenarios[i].to_run); //? cout << "after: " << Memory[1] << '\n'; //? 1 @@ -67,6 +66,10 @@ scenario parse_scenario(istream& in) { else if (scenario_command == "memory") { handle_scenario_memory_directive(inner, x); } + else if (scenario_command == "dump") { + skip_whitespace_and_comments(inner); + x.dump_layer = next_word(inner); + } // End Scenario Command Handlers else { raise << "unknown command in scenario: ^" << scenario_command << "$\n"; |