-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbatlab.html
206 lines (187 loc) · 9.72 KB
/
batlab.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Polyphemus Continuous Integration — polyphemus 0.1 documentation</title>
<link rel="stylesheet" href="_static/numpy_friendly.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Noticia+Text|Open+Sans|Droid+Sans+Mono" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '0.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/jquery.cookie.js"></script>
<script type="text/javascript" src="_static/cloud.js"></script>
<link rel="shortcut icon" href="_static/polyphemus.ico"/>
<link rel="top" title="polyphemus 0.1 documentation" href="index.html" />
<link rel="next" title="Polyphemus API" href="api/index.html" />
<link rel="prev" title="Tutorial" href="tutorial.html" />
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="relbar-top">
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> </li>
<li class="right" >
<a href="np-modindex.html" title="Python Module Index"
>modules</a> </li>
<li class="right" >
<a href="api/index.html" title="Polyphemus API"
accesskey="N">next</a> </li>
<li class="right" >
<a href="tutorial.html" title="Tutorial"
accesskey="P">previous</a> </li>
<li><a href="index.html">polyphemus 0.1 documentation</a> »</li>
</ul>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="polyphemus-continuous-integration">
<h1>Polyphemus Continuous Integration<a class="headerlink" href="#polyphemus-continuous-integration" title="Permalink to this headline">¶</a></h1>
<p>Continuous Integration in Polyphemus uses the University of Wisconsin - Madison’s <a class="reference external" href="http://batlab.org">Batlab</a></p>
<div class="section" id="running-tests-on-batlab">
<h2>Running Tests on Batlab<a class="headerlink" href="#running-tests-on-batlab" title="Permalink to this headline">¶</a></h2>
<p>First you have to create a Batlab account and have logged into the submit node.
Runs in Batlab are defined in run specification files (<tt class="docutils literal"><span class="pre">.run-spec</span></tt> files). These files
contain a list of input files, scripts to run at Batlab-defined stages, and other test options.
The scripts Batlab runs on the test node must be copied from somewhere (git, scp,wget) using
input scripts defined in the <tt class="docutils literal"><span class="pre">.run-spec</span></tt></p>
<p>To submit Batlab tests without making any changes, simply call</p>
<div class="highlight-python"><pre>~/path_to_repo/$ nmi_submit file.run_spec</pre>
</div>
<p>An example set of Batlab scripts can be found at the <a class="reference external" href="http://github.com/cyclus/ciclus">Ciclus github page</a></p>
</div>
<div class="section" id="customizing-your-tests-on-batlab">
<h2>Customizing Your Tests on Batlab<a class="headerlink" href="#customizing-your-tests-on-batlab" title="Permalink to this headline">¶</a></h2>
<p>There are many ways to customize the files in this repo to have Batlab run useful tests.</p>
<p>1) Have Batlab run code from a different repo
Say you want to test a fork of a repo before making a pull request. To
customize what git repos are pulled from, look in <tt class="docutils literal"><span class="pre">fetch/cyclus.git</span></tt>
and <tt class="docutils literal"><span class="pre">fetch/cycamore.git</span></tt> respectively. In these files you can change the url to point
to the repo of your choice.</p>
<p>2) Have Batlab run code in a non-default git branch
Batlab does not formally give options to change branches easily in fetch scripts,
but it is still easy to make the change. See fetch/cyclus.v0.2.git to see how.</p>
<p>3) Get email updates when your job is finished
To get email updates, add a line in your local run-spec file a reading
<tt class="docutils literal"><span class="pre">notify=<your_email_address></span></tt></p>
<p>4) Test a new build process
To alter Cyclus or Cycamore’s build process, look at <tt class="docutils literal"><span class="pre">build.sh</span></tt> (or <tt class="docutils literal"><span class="pre">build.mac.sh</span></tt> if
you want to change the build process for OSX) in CYCLUS and CYCAMORE respectively.
Please note that Batlab provides a bare minimum of installed files, so most of
the dependencies are built locally.</p>
<p>5) Set up nightly runs
To set up what Batlab refers to as recurring runs, you must set the <tt class="docutils literal"><span class="pre">cron_minute</span></tt> and
<tt class="docutils literal"><span class="pre">cron_hour</span></tt> fields in your run-spec to specify the hour and minute you want the run
to occur each day.</p>
<p>6) Run tests only ins OSX or Ubuntu (or try a new OS)
There is a <tt class="docutils literal"><span class="pre">platforms</span></tt> field in all run specification files that list the operating
systems to run. Some stages also have platform prefixes to specify which script should
be run in each OS stage. To get a complete list of available systems run
<tt class="docutils literal"><span class="pre">nmi_list_platforms</span></tt> on Batlab’s submit node.</p>
<p>7) Bring something back from the execute node
If you create a results.tar.gz somewhere in your Batlab run, Batlab will know to bring
that file back, and it can be found in that tests run directory. The submit script should
print the run directory for a test when you submit it.</p>
<p>8) Bypass the lengthy build process
There may be some situations where you know the problem lies with unit tests and do not
want to wait for a complete rebuild between launching tests. Use 7) above to bring back
the install directory, then in future runs have Batlab copy the install directory to the
execute node. You can then use these files for unit testing instead of building them from scratch.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/polyphemus.gif" alt="Logo"/>
</a></p>
<div class="sphinxlocaltoc">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Polyphemus Continuous Integration</a><ul>
<li><a class="reference internal" href="#running-tests-on-batlab">Running Tests on Batlab</a></li>
<li><a class="reference internal" href="#customizing-your-tests-on-batlab">Customizing Your Tests on Batlab</a></li>
</ul>
</li>
</ul>
</div>
<h4>Previous topic</h4>
<p class="topless"><a href="tutorial.html"
title="previous chapter">Tutorial</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="api/index.html"
title="next chapter">Polyphemus API</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/batlab.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="relbar-bottom">
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> </li>
<li class="right" >
<a href="np-modindex.html" title="Python Module Index"
>modules</a> </li>
<li class="right" >
<a href="api/index.html" title="Polyphemus API"
>next</a> </li>
<li class="right" >
<a href="tutorial.html" title="Tutorial"
>previous</a> </li>
<li><a href="index.html">polyphemus 0.1 documentation</a> »</li>
</ul>
</div>
</div>
<div class="footer">
© Copyright 2013, Anthony Scopatz.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
<!-- cloud_sptheme 1.4 -->
</body>
</html>