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">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Movable Type 5.2.3" />
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" />
12 <title>Status for Andrew DeFaria: easter: Indecision is the key to flexibility!</title>
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" />
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/">
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..."
30 dc:date="2008-01-30T17:55:37-06:00" />
37 <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
39 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
41 <div id="container-inner" class="pkg">
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>
51 <div id="pagebody-inner" class="pkg">
53 <div id="alpha-inner" class="pkg">
55 <p class="content-nav">
56 <a href="http://defaria.com/blogs/Status/archives/000694.html">« 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 »</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">
71 <li>Added logfile analysis</li>
73 <li>Added Timeout detection</li>
75 <li>Added environment variable support</li>
77 <li>Changed to use GetConfig for -file</li>
80 <div id="more" class="entry-more">
81 <p>The following progress has been made on easter, the EAST Test Driver:</p>
84 <li>easter -usage has gotten bigger so it's now piped to $ENV{PAGER}</li>
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<n>. 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®.<br>
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>
91 <br>Once the logfile is determined it is examined for "EXECUTION STATUS" and that is reported back to the user.</li>
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>
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<n> 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>
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 <view>, <type> and <unit>. There is a scheme for overriding that being environment, command line and config file. The environment variables are as follows:<br>
102 <div class=code><pre>
103 EASTER_VIEW Analogous to -view (e.g. export EASTER_VIEW=p6258c_easter)
104 EASTER_TYPE Analogous to -type (e.g. export EASTER_TYPE=rbs)
105 EASTER_CLASS Analogous to -class (e.g. export EASTER_CLASS=ts)
106 EASTER_UNIT Analogous to -unit (e.g. export EASTER_UNIT=5)
107 EASTER_TEST Analogous to -test (e.g. export EASTER_TEST=test1.profile)
108 EASTER_FILE Analogous to -file (e.g. export EASTER_FILE=testsuite.conf)
111 <p><font color="#c0c0c0">(and I was real tempted to make an EASTER_EGG!)</font></p>
113 <p>Any options specified on the command line override any options specified in the environment. So the user can do something like:</p>
115 <div class=code><pre>
116 $ export EASTER_FILE=testsuite.conf
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:
123 <div class=code><pre>
124 ##############################################################################
128 # Description: Test suite file to test easter
130 # Author: <a class="moz-txt-link-abbreviated" href="mailto:Andrew@DeFaria.com">Andrew@DeFaria.com</a>
132 # (c) Copyright 2008, General Dynamics, all rights reserved
134 ##############################################################################
136 # Use the following view
137 view: p63630_SIMCQ00000607_intview
139 # Set type and unit to rbs 6
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
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>
153 <div class=code><pre>
154 $ easter -f testsuite.conf
159 <div class=code><pre>
160 $ export EASTER_FILE=testsuite.conf
164 <p>The resulting output is:</p>
166 <table bgcolor="black" border="0" cellpadding="2" cellspacing="0" width="90%">
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> <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> <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> <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> <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> <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>
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>
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>
214 <div class="trackbacks-content">