2014, July 1 will be remembered as the darkest day in the history of Japan's constitutionalism because of the Abe Cabinet's approval to change the government interpretation of the supreme law to allow for the exercise of the right to collective self-defense. (cited from Asahi Shinbun, http://www.asahi.com/english/articles/AJ201407020044.html)
私は毎夜のソフトウェアテストを自動化するために Jenkins というツールを使っています.今回は, valgrind を使ってメモリーリークのテストを自動化することにし ました.その際,エラーの数の結果をグラフとして表そうと思って, Plot plugin を使うことにしました. Plot plugin の例図からは,複数のデータラインを描くことができるのは明らかなのですが,どうやったらいいのかは参照のページや,例としてあった Perl script,plugin 中の help からは私にはよくわからなかったのです. ここで重要な考えは,それぞれのデータラインにはそれぞれの出力ファイルが必要ということでした.私はこれを誤解していました. 例として,ビルドの時に次の property データファイルを出力します.それぞれのファイルが1つのデータラインを表します. valgrind_trunk_result.definitely.property valgrind_trunk_result.indirectly.property valgrind_trunk_result.possibly.property それぞれのデータの中身は1行のデータ点です.たとえば, valgrind_trunk_result.definitely.property ファイルの中身は次のような1行 です. YVALUE=0 このファイルを ${WORKSPACE} ディレクトリ以下に出力します.ここで," WORKSPACE " は jenkins が提供する環境変数です. 図1が私の plot plugin の設定を示しています.これは jenkins の config 画面です.3つの data series があって,それぞれにデータファイルがあります. Figure 1: Plot plugin configuration in Jenkins 図2が結果です.複数の線が描かれているのがわかります.(実際には 3 本の線がありますが,最初の線と2番目の線が同じデータなので,重ねって見えません.) Fugure 2: Plot data with multiple data lines

Comments
Post a Comment