diff options
author | mpeterv <mpeterval@gmail.com> | 2016-04-18 17:04:28 +0300 |
---|---|---|
committer | mpeterv <mpeterval@gmail.com> | 2016-04-18 17:04:28 +0300 |
commit | 9abc1c0dec937b848a7e9b247c1c4ec80016ac04 (patch) | |
tree | 40370fb50a50b5421401175a48ba56df89a49d88 | |
parent | 10cc95b4372b078292265d05bfa7b01d350a85ee (diff) | |
download | luacov-9abc1c0dec937b848a7e9b247c1c4ec80016ac04.tar.gz |
0.11.0 release
-rw-r--r-- | README.md | 20 | ||||
-rw-r--r-- | doc/doc/index.html | 2 | ||||
-rw-r--r-- | doc/doc/modules/luacov.defaults.html | 2 | ||||
-rw-r--r-- | doc/doc/modules/luacov.html | 2 | ||||
-rw-r--r-- | doc/doc/modules/luacov.reporter.html | 2 | ||||
-rw-r--r-- | doc/doc/modules/luacov.runner.html | 48 | ||||
-rw-r--r-- | doc/doc/modules/luacov.stats.html | 83 | ||||
-rw-r--r-- | doc/doc/modules/luacov.tick.html | 2 | ||||
-rw-r--r-- | doc/index.html | 29 | ||||
-rw-r--r-- | rockspecs/luacov-0.11.0-1.rockspec | 39 | ||||
-rw-r--r-- | src/luacov/runner.lua | 2 |
11 files changed, 131 insertions, 100 deletions
@@ -57,16 +57,16 @@ extension stripped. This is an example output of the report file: - ============================================================ - ../test.lua - ============================================================ - - -- Which branch will run? - 1 if 10 > 100 then - 0 print("I don't think this line will execute.") - 0 else - 1 print("Hello, LuaCov!") - 1 end +``` +============================================================================== +test.lua +============================================================================== + 1 if 10 > 100 then +*0 print("I don't think this line will execute.") + else + 1 print("Hello, LuaCov!") + end +``` Note that to generate this report, `luacov` reads the source files. Therefore, it expects to find them in the same location they were when the `luacov` diff --git a/doc/doc/index.html b/doc/doc/index.html index 15331c6..26c4d57 100644 --- a/doc/doc/index.html +++ b/doc/doc/index.html @@ -79,7 +79,7 @@ </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i> -<i style="float:right;">Last updated 2016-02-09 14:12:55 </i> +<i style="float:right;">Last updated 2016-04-18 11:50:47 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> diff --git a/doc/doc/modules/luacov.defaults.html b/doc/doc/modules/luacov.defaults.html index 23f3fed..52bdc0e 100644 --- a/doc/doc/modules/luacov.defaults.html +++ b/doc/doc/modules/luacov.defaults.html @@ -272,7 +272,7 @@ </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i> -<i style="float:right;">Last updated 2016-02-09 14:12:55 </i> +<i style="float:right;">Last updated 2016-04-18 11:50:47 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> diff --git a/doc/doc/modules/luacov.html b/doc/doc/modules/luacov.html index c932cac..d599026 100644 --- a/doc/doc/modules/luacov.html +++ b/doc/doc/modules/luacov.html @@ -66,7 +66,7 @@ </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i> -<i style="float:right;">Last updated 2016-02-09 14:12:55 </i> +<i style="float:right;">Last updated 2016-04-18 11:50:47 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> diff --git a/doc/doc/modules/luacov.reporter.html b/doc/doc/modules/luacov.reporter.html index 0ee7d26..d1884b5 100644 --- a/doc/doc/modules/luacov.reporter.html +++ b/doc/doc/modules/luacov.reporter.html @@ -423,7 +423,7 @@ </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i> -<i style="float:right;">Last updated 2016-02-09 14:12:55 </i> +<i style="float:right;">Last updated 2016-04-18 11:50:47 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> diff --git a/doc/doc/modules/luacov.runner.html b/doc/doc/modules/luacov.runner.html index d9f45f6..74ee7f9 100644 --- a/doc/doc/modules/luacov.runner.html +++ b/doc/doc/modules/luacov.runner.html @@ -33,6 +33,7 @@ <h2>Contents</h2> <ul> <li><a href="#Functions">Functions</a></li> +<li><a href="#Fields">Fields</a></li> </ul> @@ -85,11 +86,11 @@ </tr> <tr> <td class="name" nowrap><a href="#pause">pause ()</a></td> - <td class="summary">Pauses LuaCov's runner.</td> + <td class="summary">Pauses saving data collected by LuaCov's runner.</td> </tr> <tr> <td class="name" nowrap><a href="#resume">resume ()</a></td> - <td class="summary">Resumes LuaCov's runner.</td> + <td class="summary">Resumes saving data collected by LuaCov's runner.</td> </tr> <tr> <td class="name" nowrap><a href="#with_luacov">with_luacov (f)</a></td> @@ -120,6 +121,13 @@ <td class="summary">Adds a tree to the include list (see <a href="../modules/luacov.defaults.html#">luacov.defaults</a>).</td> </tr> </table> +<h2><a href="#Fields">Fields</a></h2> +<table class="function_list"> + <tr> + <td class="name" nowrap><a href="#version">version</a></td> + <td class="summary">LuaCov version in <code>MAJOR.MINOR.PATCH</code> format.</td> + </tr> +</table> <br/> <br/> @@ -140,7 +148,7 @@ <h3>Parameters:</h3> <ul> <li><span class="parameter">filename</span> - Normalize file names before using patterns. + name of the file. </li> </ul> @@ -253,9 +261,7 @@ <h3>Parameters:</h3> <ul> <li><span class="parameter">filename</span> - - - + name of the file. </li> </ul> @@ -298,9 +304,9 @@ <strong>pause ()</strong> </dt> <dd> - Pauses LuaCov's runner. - Saves collected data and stops, allowing other processes to write to - the same stats file. Data is still collected during pause. + Pauses saving data collected by LuaCov's runner. + Allows other processes to write to the same stats file. + Data is still collected during pause. @@ -314,9 +320,7 @@ <strong>resume ()</strong> </dt> <dd> - Resumes LuaCov's runner. - Reloads stats file, possibly updated from other processes, - and continues saving collected data. + Resumes saving data collected by LuaCov's runner. @@ -523,13 +527,31 @@ </dd> </dl> + <h2 class="section-header "><a name="Fields"></a>Fields</h2> + + <dl class="function"> + <dt> + <a name = "version"></a> + <strong>version</strong> + </dt> + <dd> + LuaCov version in <code>MAJOR.MINOR.PATCH</code> format. + + + + + + + +</dd> +</dl> </div> <!-- id="content" --> </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i> -<i style="float:right;">Last updated 2016-02-09 14:12:55 </i> +<i style="float:right;">Last updated 2016-04-18 11:50:47 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> diff --git a/doc/doc/modules/luacov.stats.html b/doc/doc/modules/luacov.stats.html index dbe40ba..c1f5a74 100644 --- a/doc/doc/modules/luacov.stats.html +++ b/doc/doc/modules/luacov.stats.html @@ -52,27 +52,20 @@ <h1>Module <code>luacov.stats</code></h1> <p>Manages the file with statistics (being) collected.</p> -<p> In general the module requires that its property <code>stats.statsfile</code> - has been set to the filename of the statsfile to create, load, etc.</p> +<p> + +</p> <h2><a href="#Functions">Functions</a></h2> <table class="function_list"> <tr> - <td class="name" nowrap><a href="#load">load ()</a></td> + <td class="name" nowrap><a href="#load">load (statsfile)</a></td> <td class="summary">Loads the stats file.</td> </tr> <tr> - <td class="name" nowrap><a href="#start">start ()</a></td> - <td class="summary">Opens the statfile</td> - </tr> - <tr> - <td class="name" nowrap><a href="#stop">stop (fd)</a></td> - <td class="summary">Closes the statfile</td> - </tr> - <tr> - <td class="name" nowrap><a href="#save">save (data, fd)</a></td> - <td class="summary">Saves data to the statfile</td> + <td class="name" nowrap><a href="#save">save (statsfile, data)</a></td> + <td class="summary">Saves data to the stats file.</td> </tr> </table> @@ -85,17 +78,24 @@ <dl class="function"> <dt> <a name = "load"></a> - <strong>load ()</strong> + <strong>load (statsfile)</strong> </dt> <dd> Loads the stats file. + <h3>Parameters:</h3> + <ul> + <li><span class="parameter">statsfile</span> + path to the stats file. + </li> + </ul> <h3>Returns:</h3> <ol> - table with data. The table maps filenames to stats tables. + table with data or nil if couldn't load. + The table maps filenames to stats tables. Per-file tables map line numbers to hits or nils when there are no hits. Additionally, .max field contains maximum line number and .max_hits contains maximum number of hits in the file. @@ -106,59 +106,20 @@ </dd> <dt> - <a name = "start"></a> - <strong>start ()</strong> - </dt> - <dd> - Opens the statfile - - - - <h3>Returns:</h3> - <ol> - - filehandle - </ol> - - - - -</dd> - <dt> - <a name = "stop"></a> - <strong>stop (fd)</strong> - </dt> - <dd> - Closes the statfile - - - <h3>Parameters:</h3> - <ul> - <li><span class="parameter">fd</span> - filehandle to the statsfile - </li> - </ul> - - - - - -</dd> - <dt> <a name = "save"></a> - <strong>save (data, fd)</strong> + <strong>save (statsfile, data)</strong> </dt> <dd> - Saves data to the statfile + Saves data to the stats file. <h3>Parameters:</h3> <ul> - <li><span class="parameter">data</span> - data to store + <li><span class="parameter">statsfile</span> + path to the stats file. </li> - <li><span class="parameter">fd</span> - filehandle where to store + <li><span class="parameter">data</span> + data to store. </li> </ul> @@ -174,7 +135,7 @@ </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i> -<i style="float:right;">Last updated 2016-02-09 14:12:55 </i> +<i style="float:right;">Last updated 2016-04-18 11:50:47 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> diff --git a/doc/doc/modules/luacov.tick.html b/doc/doc/modules/luacov.tick.html index 5232d9e..45241ab 100644 --- a/doc/doc/modules/luacov.tick.html +++ b/doc/doc/modules/luacov.tick.html @@ -68,7 +68,7 @@ </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i> -<i style="float:right;">Last updated 2016-02-09 14:12:55 </i> +<i style="float:right;">Last updated 2016-04-18 11:50:47 </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> diff --git a/doc/index.html b/doc/index.html index 04d260c..565e46c 100644 --- a/doc/index.html +++ b/doc/index.html @@ -143,16 +143,14 @@ directory, and outputs a file named <tt>luacov.report.out</tt>. <p>This is an example output of the report file:</p> <div class="Example"><pre> -============================================================ -../test.lua -============================================================ - - -- Which branch will run? -1 if 10 > 100 then -0 print("I don't think this line will execute.") -0 else -1 print("Hello, LuaCov!") -1 end +============================================================================== +test.lua +============================================================================== + 1 if 10 > 100 then +*0 print("I don't think this line will execute.") + else + 1 print("Hello, LuaCov!") + end </pre></div> <p> @@ -178,6 +176,17 @@ just modify the first line of <tt>xavante_start.lua</tt> so it reads: <h2><a name="history"></a>History</h2> <dl> + <dt><strong>0.11.0</strong> [April 18, 2016]</dt> + <dd> + <ul> + <li>Fixed several cases of lines falsely reported as missed.</li> + <li>Fixed <tt>luacov.tick</tt> module not working.</li> + <li>Improved default reporter output format.</li> + <li>Reduced coverage collection overhead.</li> + <li>Changed how coverage is saved, it's now possible to start a child Lua process with LuaCov enabled without wrapping the launch in <tt>luacov.pause</tt> and <tt>luacov.resume</tt> in the parent. + <li>Several minor fixes and improvements.</li> + </ul> + </dd> <dt><strong>0.10.0</strong> [February 9, 2016]</dt> <dd> <ul> diff --git a/rockspecs/luacov-0.11.0-1.rockspec b/rockspecs/luacov-0.11.0-1.rockspec new file mode 100644 index 0000000..ff1b54c --- /dev/null +++ b/rockspecs/luacov-0.11.0-1.rockspec @@ -0,0 +1,39 @@ +package = "LuaCov" +version = "0.11.0-1" +source = { + url = "git://github.com/keplerproject/luacov", + tag = "v0.11.0" +} +description = { + summary = "Coverage analysis tool for Lua scripts", + detailed = [[ + LuaCov is a simple coverage analysis tool for Lua scripts. + When a Lua script is run with the luacov module, it + generates a stats file. The luacov command-line script then + processes this file generating a report indicating which code + paths were not traversed, which is useful for verifying the + effectiveness of a test suite. + ]], + homepage = "http://keplerproject.github.com/luacov/", + license = "MIT/X11" +} +dependencies = { + "lua >= 5.1" +} +build = { + type = "builtin", + modules = { + ["luacov.defaults"] = "src/luacov/defaults.lua", + ["luacov"] = "src/luacov.lua", + ["luacov.reporter"] = "src/luacov/reporter.lua", + ["luacov.reporter.default"] = "src/luacov/reporter/default.lua", + ["luacov.runner"] = "src/luacov/runner.lua", + ["luacov.stats"] = "src/luacov/stats.lua", + ["luacov.tick"] = "src/luacov/tick.lua", + }, + install = { + bin = { + ["luacov"] = "src/bin/luacov", + } + } +} diff --git a/src/luacov/runner.lua b/src/luacov/runner.lua index f75bbf1..a722447 100644 --- a/src/luacov/runner.lua +++ b/src/luacov/runner.lua @@ -6,7 +6,7 @@ local runner = {} --- LuaCov version in `MAJOR.MINOR.PATCH` format. -runner.version = "0.10.0" +runner.version = "0.11.0" local stats = require("luacov.stats") runner.defaults = require("luacov.defaults") |