<!---
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
-->

<h1 id="qbt">qbt</h1>

<p><code>qbt</code> is a command to execute test-patch without a patch.  It uses<br />
the same plug-ins and the same options as test-patch.  The only<br />
difference is that no patch file, location, etc should be supplied.<br />
It is meant to be a way to easily get test-patch's output on your<br />
current source tree.  It is suitable to be run as a regularly<br />
scheduled build as part of your overall development strategy.</p>

<h1 id="reporting">Reporting</h1>

<p>When using an automation tool, it may be useful to use the<br />
<code>--console-report-file</code> option to send the summary email to a<br />
file. This can then be used with systems like Jenkin's<br />
email-ext plug-in to send the output as an emailed report:</p>

<div class="highlight"><pre class="highlight plaintext"><code>${FILE,path="&lt;report-file-path&gt;"}
</code></pre></div>
<p>For something a bit more structured, there is also the <code>--html-report-file</code><br />
option.  Using this output, again with Jenkins' email-ext plug-in, it is<br />
possible to build some very nice looking output that is easily customized:</p>

<div class="highlight"><pre class="highlight html"><code><span class="nt">&lt;html&gt;</span>
<span class="nt">&lt;head&gt;</span>
<span class="nt">&lt;style&gt;</span>
<span class="nt">table</span> <span class="p">{</span>
    <span class="nl">border-collapse</span><span class="p">:</span> <span class="nb">collapse</span><span class="p">;</span>
<span class="p">}</span>
<span class="nt">table</span><span class="o">,</span> <span class="nt">th</span><span class="o">,</span> <span class="nt">td</span> <span class="p">{</span>
   <span class="nl">border</span><span class="p">:</span> <span class="m">1px</span> <span class="nb">solid</span> <span class="no">black</span><span class="p">;</span>
<span class="p">}</span>
<span class="nt">tr</span><span class="nd">:nth-child</span><span class="o">(</span><span class="nt">even</span><span class="o">)</span><span class="p">{</span><span class="nl">background-color</span><span class="p">:</span> <span class="m">#f2f2f2</span><span class="p">}</span>
<span class="nt">&lt;/style&gt;</span>
<span class="nt">&lt;/head&gt;</span>
<span class="nt">&lt;body&gt;</span>
<span class="nt">&lt;p&gt;</span>See the <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"${BUILD_URL}"</span><span class="nt">&gt;</span>Jenkins Build<span class="nt">&lt;/a&gt;</span> for more information.<span class="nt">&lt;/p&gt;</span>
<span class="nt">&lt;p&gt;</span>${CHANGES, format="<span class="nt">&lt;div&gt;</span>[%d] (%a) %m<span class="nt">&lt;/div&gt;</span>"}<span class="nt">&lt;/p&gt;</span>
<span class="nt">&lt;p&gt;&lt;/p&gt;</span>
${FILE,path="<span class="nt">&lt;report-file-path&gt;</span>"}
<span class="nt">&lt;/body&gt;&lt;/html&gt;</span>
</code></pre></div>
<p>If your mailing lists do not allow HTML-formatted email, then the <code>--brief-report-file</code><br />
provides a solution.  This option creates a very plain, reduced content text file<br />
suitable for email.  It contains just the barebones information needed to get<br />
information on failures: what voted -1, what tests failed, what subsystems are long<br />
running (configurable with the <code>--brief-report-long</code> opton), and a list of any<br />
attached log files.</p>

<p>NOTE: Be aware that ASF mailing lists do not allow HTML formatted email.</p>

<h1 id="archiving">Archiving</h1>

<p>It may be useful to save off certain files while qbt is running for more<br />
post-processing by another utility.  If the <code>rsync</code> command is available,<br />
then the archiving functionality may be used.</p>

<p>The <code>--archive-list</code> option takes a comma separated list of <code>find -name</code><br />
patterns and copies them to the patch directory's archiver subdirectory.<br />
It will preserve the directory structure of the source tree so that<br />
multiple matching file names will be preserved.</p>
