RTM-Lua

View the Project on GitHub Nobu19800/RTM-Lua

単体テスト実行手順

luaunitのインストール

luaunitをインストールする。

luarocks install luaunit

lcovtoolsのインストール

lcovtoolsをインストールする。

luarocksに対応していないため、自分の環境でビルドしてlcovtools.dllをclibsにコピーする。

msxsl.exeの入手

以下からmsxsl.exeを入手する。

テスト実行

all_test.luaを実行するとすべてのテストを実行して、result.xmlというXML形式の解析データを出力。

lua test/all_test.lua -v

HTML形式のコードカバレッジレポート出力

lcovtoolsのPythonスクリプトを適当な場所にコピーする。 以下のコマンドを実行すると、report.xmlにコードカバレッジレポートをXML形式で出力。

python scripts/extractlines.py lua\openrtm\*.lua > validLines.xml
python scripts/makereport.py validLines.xml result.xml report.xml -b ./

lcovtoolslua.cssreport.xslを適当な場所にコピーする。 以下のコマンドでreport.htmlを出力。

msxsl report.xml report.xsl -o report.html