Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000695.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
4 <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta name="generator" content="Movable Type 5.2.3" />
7
8    <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9    <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml" />
11
12    <title>Status for Andrew DeFaria: easter: Indecision is the key to flexibility!</title>
13
14    <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15    <link rel="prev" href="http://defaria.com/blogs/Status/archives/000694.html" title="East.pm" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000696.html" title="Rexec" />
17
18    <!--
19 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
20          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
21          xmlns:dc="http://purl.org/dc/elements/1.1/">
22 <rdf:Description
23     rdf:about="http://defaria.com/blogs/Status/archives/000695.html"
24     trackback:ping="http://defaria.com/mt/mt-tb.cgi/82"
25     dc:title="easter: Indecision is the key to flexibility!"
26     dc:identifier="http://defaria.com/blogs/Status/archives/000695.html"
27     dc:subject="General Dynamics"
28     dc:description="Easter Paged usage Added logfile analysis Added Timeout detection Added environment variable support Changed to use GetConfig for -file..."
29     dc:creator=""
30     dc:date="2008-01-30T17:55:37-06:00" />
31 </rdf:RDF>
32 -->
33
34
35    
36
37    <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
38 </head>
39 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
40    <div id="container">
41       <div id="container-inner" class="pkg">
42
43          <div id="banner">
44             <div id="banner-inner" class="pkg">
45                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
46                <h2 id="banner-description">Searchable status reports and work log</h2>
47             </div>
48          </div>
49
50          <div id="pagebody">
51             <div id="pagebody-inner" class="pkg">
52                <div id="alpha">
53                   <div id="alpha-inner" class="pkg">
54
55                      <p class="content-nav">
56                         <a href="http://defaria.com/blogs/Status/archives/000694.html">&laquo; East.pm</a> |
57                         <a href="http://defaria.com/blogs/Status/">Main</a>
58                         | <a href="http://defaria.com/blogs/Status/archives/000696.html">Rexec &raquo;</a>
59                      </p>
60
61                      <a id="a000695"></a>
62                      <div class="entry" id="entry-695">
63                         <h3 class="entry-header">easter: Indecision is the key to flexibility!</h3>
64                         <div class="entry-content">
65                            <div class="entry-body">
66                               <h2>Easter</h2>
67
68 <ul>
69   <li>Paged usage</li>
70
71   <li>Added logfile analysis</li>
72
73   <li>Added Timeout detection</li>
74
75   <li>Added environment variable support</li>
76
77   <li>Changed to use GetConfig for -file</li>
78 </ul>
79                            </div>
80                            <div id="more" class="entry-more">
81                               <p>The following progress has been made on easter, the EAST Test Driver:</p>
82
83 <ul>
84   <li>easter -usage has gotten bigger so it's now piped to $ENV{PAGER}</li>
85
86   <li>Added log file analysis: easter now examines the log file produced by the running of test cases. It does this by extracting the test case name, not to be confused with the test case <u>file</u> name, from the profile file and composing a (long) path to the log file that the running of East produces. Note that easter is running remotely from a workstation on the RAN and driving tests and processes on raneast and ceast&lt;n&gt;. As such it dynamically expands environment
87 variables like $MNT_DIR and $EAST_REL in composing the path to the log file so that in the event of a change in either of these environment variables will be automatically sense and it will Just Work&reg;.<br>
88
89 <br>An additional complexity is that part of the path to the logfile contains a timestamp down to the millisecond. It's difficult (read impossible) to determine the exact timestamp that will be issues and guessing has it's challenges too. Instead, easter takes the approach of using "ls -t | head -1" to determine the most recently modified directory (timestamp directory that is). This works reasonably well provided we don't have multiple tests or processes writing in that directory.<br>
90
91 <br>Once the logfile is determined it is examined for "EXECUTION STATUS" and that is reported back to the user.</li>
92
93   <li>Implemented rudimentary detection of timeouts. In testing I noticed that TS_default.profile never exits. So instead it times out. This situation is detected and counted as a timeout (I'd still like an example test case that exits without indicating Success or Failure).<br>
94
95 <blockquote>
96   <small><p><b>Note: </b>It's been observes that other timeouts have been happening. For example, sometimes the connection to raneast seems to just hang. This could be due to abnormal load on raneast, ceast&lt;n&gt; or other hardware. The easter script does not always handle such things that gracefully yet. In general easter allows for up to 30 seconds for each remote execution of a command, including tests. How long do tests take?</p></small>
97 </blockquote>
98   </li>
99
100   <li>Added environment variables. The user can now set into the environment various parameters for easter so that they need not have to specify them on the command line. Generally this is used to set things that remain the same for the whole execution of easter like &lt;view&gt;, &lt;type&gt; and &lt;unit&gt;. There is a scheme for overriding that being environment, command line and config file. The environment variables are as follows:<br>
101
102 <div class=code><pre>
103 EASTER_VIEW  Analogous to -view&nbsp; (e.g. export EASTER_VIEW=p6258c_easter)
104 EASTER_TYPE  Analogous to -type&nbsp; (e.g. export EASTER_TYPE=rbs)
105 EASTER_CLASS Analogous to -class (e.g. export EASTER_CLASS=ts)
106 EASTER_UNIT  Analogous to -unit&nbsp; (e.g. export EASTER_UNIT=5)
107 EASTER_TEST  Analogous to -test&nbsp; (e.g. export EASTER_TEST=test1.profile)
108 EASTER_FILE  Analogous to -file&nbsp; (e.g. export EASTER_FILE=testsuite.conf)
109 </pre></div>
110
111 <p><font color="#c0c0c0">(and I was real tempted to make an EASTER_EGG!)</font></p>
112
113 <p>Any options specified on the command line override any options specified in the environment. So the user can do something like:</p>
114
115 <div class=code><pre>
116 $ export EASTER_FILE=testsuite.conf
117 $ easter
118 </pre></div>
119   </li>
120
121   <li>Expanded the syntax of the -file file. This now uses the GetConfig module. This is a more simplex form of config file, less complicated than say XML. It's more akin to X Resource files and allows for commenting. The config file now can contain configuration options embedded in the file as well as test executions. Comments are supported with the standard "#". Here's an example file:
122
123 <div class=code><pre>
124 ##############################################################################
125 #
126 # Name:          testsuite1
127 #
128 # Description:  Test suite file to test easter
129 #
130 # Author:        <a class="moz-txt-link-abbreviated" href="mailto:Andrew@DeFaria.com">Andrew@DeFaria.com</a>
131 #
132 # (c) Copyright 2008, General Dynamics, all rights reserved
133 #
134 ##############################################################################
135
136 # Use the following view
137 view:&nbsp;&nbsp; p63630_SIMCQ00000607_intview
138
139 # Set type and unit to rbs 6
140 type:   rbs
141 unit:    6
142
143 # Execute the following ts tests
144 exec:    TS_b2_l3_auto_test.profile
145 exec:    TS_success.profile
146 exec:    TS_failure.profile
147 exec:    TS_profile.profile
148 exec:    TS_default.profile
149 </pre></div>
150
151 <p>We can see that we are using a specific view, type and unit, which holds for all tests. Each exec line is cumulative (passes in an array to the script) of test cases to run. We can easily execute this "testsuite" then by doing either of:</p>
152
153 <div class=code><pre>
154 $ easter -f testsuite.conf
155 </pre></div>
156
157 or
158
159 <div class=code><pre>
160 $ export EASTER_FILE=testsuite.conf
161 $ easter
162 </pre></div>
163
164 <p>The resulting output is:</p>
165
166 <table bgcolor="black" border="0" cellpadding="2" cellspacing="0" width="90%">
167   <tbody>
168     <tr>
169       <td valign="top"><font color="#ffffff"><tt><b><font color="yellow">Randws016:</font></b><font color="yellow"><font color="#ffffff">ct setview p6258c_RANCQ00023645_devview</font></font><b><font color="yellow"><br></font></b></tt></font><font color="#ffffff"><tt><b><font  color="yellow">Randws016:</font></b><font color="yellow"><font color="#ffffff">cd /vobs/rantest/tools/lib/Nethawk</font></font><br>
170 </tt></font><font color="#ffffff"><tt><b><font color="yellow">Randws016:</font></b></tt></font><font  color="#ffffff"><tt>export EASTER_FILE=testsuite.conf</tt></font><br>
171           <font color="#ffffff"><tt><b><font color="yellow">Randws016:</font></b><font
172  color="#ffffff">easter</font></tt></font><br>
173           <font color="#ffffff"><tt>Please be patient while we set up
174 the test environment... done<br>
175           <font color="cyan">ts</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="yellow">TS_b2_l3_auto_test_.profile</font>
176           <font color="green">Success</font><br>
177           </tt></font><font color="#ffffff"><tt><font color="cyan">
178 ts</font></tt></font><font color="#ffffff"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font
179  color="yellow">TS_success.profile</font> <font color="green">Success</font><br>
180           </tt></font><font color="#ffffff"><tt><font color="cyan">
181 ts</font></tt></font><font color="#ffffff"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font
182  color="yellow">TS_success.profile</font> <font color="red">Failure</font><br>
183           </tt></font><font color="#ffffff"><tt><font color="cyan">
184 ts</font></tt></font><font color="#ffffff"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font
185  color="yellow">TS_success.profile</font> <font color="red">Failure</font><br>
186           </tt></font><font color="#ffffff"><tt><font color="cyan">
187 ts</font></tt></font><font color="#ffffff"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font
188  color="yellow">TS_default.profile</font> <font color="cyan">Timed out<br>
189           <font color="#ffffff">easter summary</font><br>
190           <font color="yellow">5 tests run</font><br>
191           <font color="green">2 tests passed</font><br>
192           <font color="red">2 tests failed</font><br>
193 1 test incomplete<br>
194           </font></tt></font></td>
195         </tr>
196       </tbody>
197     </table>
198     <tt></tt></li>
199
200 </ul>
201                            </div>
202                         </div>
203                         <p class="entry-footer">
204                            <span class="post-footers">Posted by  on January 30, 2008  5:55 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000695.html">Permalink</a>
205                         </p>
206                      </div>
207
208                      
209                      <div class="trackbacks">
210                         <h3 id="trackback" class="trackbacks-header">TrackBack</h3>
211                         <div id="trackbacks-info">
212                            <p>TrackBack URL for this entry:<br />http://defaria.com/mt/mt-tb.cgi/82</p>
213                         </div>
214                         <div class="trackbacks-content">
215                            
216                         </div>
217                      </div>
218                      
219
220                      
221                   </div>
222                </div>
223             </div>
224          </div>
225       </div>
226    </div>
227 </body>
228 </html>