docs/CustomCheck.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Module: CustomCheck
— Documentation by YARD 0.9.19
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "CustomCheck";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index (C)</a> »
<span class="title">CustomCheck</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Module: CustomCheck
</h1>
<div class="box_info">
<dl>
<dt>Includes:</dt>
<dd><span class='object_link'><a href="Runners.html" title="Runners (module)">Runners</a></span></dd>
</dl>
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="PotentialBuild.html" title="PotentialBuild (class)">PotentialBuild</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/custom_check.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>contains functions necessary for working with the 'custom_check' scripts</p>
</div>
</div>
<div class="tags">
</div>
<h2>
Instance Method Summary
<small><a href="#" class="summary_toggle">collapse</a></small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#custom_check-instance_method" title="#custom_check (instance method)">#<strong>custom_check</strong>(this_config, compiler, src_dir, build_dir) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
</ul>
<h3 class="inherited">Methods included from <span class='object_link'><a href="Runners.html" title="Runners (module)">Runners</a></span></h3>
<p class="inherited"><span class='object_link'><a href="Runners.html#monitor_thread_state-instance_method" title="Runners#monitor_thread_state (method)">#monitor_thread_state</a></span>, <span class='object_link'><a href="Runners.html#read_state_singular-instance_method" title="Runners#read_state_singular (method)">#read_state_singular</a></span>, <span class='object_link'><a href="Runners.html#run_scripts-instance_method" title="Runners#run_scripts (method)">#run_scripts</a></span>, <span class='object_link'><a href="Runners.html#run_single_script-instance_method" title="Runners#run_single_script (method)">#run_single_script</a></span>, <span class='object_link'><a href="Runners.html#run_with_timeout-instance_method" title="Runners#run_with_timeout (method)">#run_with_timeout</a></span></p>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="custom_check-instance_method">
#<strong>custom_check</strong>(this_config, compiler, src_dir, build_dir) ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/custom_check.rb', line 12</span>
<span class='kw'>def</span> <span class='id identifier rubyid_custom_check'>custom_check</span><span class='lparen'>(</span><span class='id identifier rubyid_this_config'>this_config</span><span class='comma'>,</span> <span class='id identifier rubyid_compiler'>compiler</span><span class='comma'>,</span> <span class='id identifier rubyid_src_dir'>src_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='rparen'>)</span>
<span class='id identifier rubyid_test_results'>test_results</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:commands</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_command'>command</span><span class='op'>|</span>
<span class='id identifier rubyid_compiler_flags'>compiler_flags</span> <span class='op'>=</span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_mkdir_p'>mkdir_p</span><span class='lparen'>(</span><span class='id identifier rubyid_build_dir'>build_dir</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_directory?'>directory?</span><span class='lparen'>(</span><span class='id identifier rubyid_build_dir'>build_dir</span><span class='rparen'>)</span>
<span class='kw'>begin</span>
<span class='id identifier rubyid_out'>out</span><span class='comma'>,</span> <span class='id identifier rubyid_err'>err</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_run_scripts'>run_scripts</span><span class='lparen'>(</span><span class='id identifier rubyid_this_config'>this_config</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>cd </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_src_dir'>src_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'> && </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_command'>command</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compiler_flags'>compiler_flags</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='kw'>rescue</span>
<span class='id identifier rubyid_test_results'>test_results</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="TestResult.html" title="TestResult (class)">TestResult</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="TestResult.html#initialize-instance_method" title="TestResult#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>failed</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='int'>0</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Could not run file, check permissions, executable bit, etc.</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='id identifier rubyid_test_results'>test_results</span>
<span class='kw'>end</span> <span class='comment'># expected fields to be read: "tool", "file", "line", "column" (optional), "message_type", "message", "id" (optional)
</span>
<span class='kw'>if</span> <span class='id identifier rubyid_process_custom_check_results'>process_custom_check_results</span><span class='lparen'>(</span><span class='id identifier rubyid_src_dir'>src_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_out'>out</span><span class='comma'>,</span> <span class='id identifier rubyid_err'>err</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='rparen'>)</span>
<span class='id identifier rubyid_test_results'>test_results</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="TestResult.html" title="TestResult (class)">TestResult</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="TestResult.html#initialize-instance_method" title="TestResult#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>passed</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='int'>0</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_test_results'>test_results</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="TestResult.html" title="TestResult (class)">TestResult</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="TestResult.html#initialize-instance_method" title="TestResult#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>failed</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='int'>0</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_test_results'>test_results</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Thu May 18 09:42:02 2023 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.19 (ruby-2.7.0).
</div>
</div>
</body>
</html>