diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-08-27 20:49:03 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-08-27 20:49:03 -0700 |
commit | cd9bb850caeca88747a25436fc65c67c6d5cd89a (patch) | |
tree | 34ea30beb19b5fafe855b951b9468d2a9e915492 /html/020run.cc.html | |
parent | e947da75bd926da6d533fd73b352c16c8417b3f6 (diff) | |
download | mu-cd9bb850caeca88747a25436fc65c67c6d5cd89a.tar.gz |
3266
Diffstat (limited to 'html/020run.cc.html')
-rw-r--r-- | html/020run.cc.html | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/html/020run.cc.html b/html/020run.cc.html index 61706723..31a8e9ad 100644 --- a/html/020run.cc.html +++ b/html/020run.cc.html @@ -186,8 +186,8 @@ load_file_or_directory<span class="Delimiter">(</span><span class="Constant">&qu <span class="CommentedCode">//? START_TRACING_UNTIL_END_OF_SCOPE</span> <span class="Normal">if</span> <span class="Delimiter">(</span>argc > <span class="Constant">1</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Comment">// skip argv[0]</span> - argv++<span class="Delimiter">;</span> - argc--<span class="Delimiter">;</span> + ++argv<span class="Delimiter">;</span> + --argc<span class="Delimiter">;</span> <span class="Comment">// ignore argv past '--'; that's commandline args for 'main'</span> <span class="Normal">while</span> <span class="Delimiter">(</span>argc > <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Normal">if</span> <span class="Delimiter">(</span>string<span class="Delimiter">(</span>*argv<span class="Delimiter">)</span> == <span class="Constant">"--"</span><span class="Delimiter">)</span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -200,6 +200,7 @@ load_file_or_directory<span class="Delimiter">(</span><span class="Constant">&qu transform_all<span class="Delimiter">();</span> <span class="CommentedCode">//? DUMP("");</span> <span class="CommentedCode">//? exit(0);</span> +<span class="Normal">if</span> <span class="Delimiter">(</span>Trace_errors<span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">1</span><span class="Delimiter">;</span> save_snapshots<span class="Delimiter">();</span> <span class="Comment">//: Step 3: if we aren't running tests, locate a recipe called 'main' and</span> @@ -213,7 +214,6 @@ save_snapshots<span class="Delimiter">();</span> trace<span class="Delimiter">(</span><span class="Constant">9990</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"=== Starting to run"</span> << end<span class="Delimiter">();</span> assert<span class="Delimiter">(</span>Num_calls_to_transform_all == <span class="Constant">1</span><span class="Delimiter">);</span> run_main<span class="Delimiter">(</span>argc<span class="Delimiter">,</span> argv<span class="Delimiter">);</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>Trace_main<span class="Delimiter">)</span> <span class="Normal">delete</span> Trace_stream<span class="Delimiter">,</span> Trace_stream = <span class="Constant">NULL</span><span class="Delimiter">;</span> teardown<span class="Delimiter">();</span> <span class="Delimiter">}</span> <span class="Delimiter">:(code)</span> @@ -255,6 +255,7 @@ save_snapshots<span class="Delimiter">();</span> fout << Trace_stream<span class="Delimiter">-></span>readable_contents<span class="Delimiter">(</span><span class="Constant">""</span><span class="Delimiter">);</span> fout<span class="Delimiter">.</span>close<span class="Delimiter">();</span> <span class="Delimiter">}</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>Trace_stream<span class="Delimiter">)</span> <span class="Normal">delete</span> Trace_stream<span class="Delimiter">,</span> Trace_stream = <span class="Constant">NULL</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Delimiter">:(before "End One-time Setup")</span> atexit<span class="Delimiter">(</span>cleanup_main<span class="Delimiter">);</span> @@ -267,7 +268,7 @@ atexit<span class="Delimiter">(</span>cleanup_main<span class="Delimiter">);</sp <span class="Delimiter">}</span> ifstream fin<span class="Delimiter">(</span>filename<span class="Delimiter">.</span>c_str<span class="Delimiter">());</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!fin<span class="Delimiter">)</span> <span class="Delimiter">{</span> - raise << <span class="Constant">"no such file '"</span> << filename << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + cerr << <span class="Constant">"no such file '"</span> << filename << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Comment">// don't raise, just warn. just in case it's just a name for a scenario to run.</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> trace<span class="Delimiter">(</span><span class="Constant">9990</span><span class="Delimiter">,</span> <span class="Constant">"load"</span><span class="Delimiter">)</span> << <span class="Constant">"=== "</span> << filename << end<span class="Delimiter">();</span> |