修正版を動かしてみる
shiro さんが早速 _This allows build monitoring tools to detect test failure._な commit を push なさったとのことで clone して動作確認をしてみることに。
ダウンロードによれば以下で clone できるとのこと。
$ git clone git://gauche.git.sourceforge.net/gitroot/gauche/Gauche
HACKING 見とけとのことで確認。
確認
autoconf は 2.54 以降でとのこと。手元の環境には一応 Gauche も入ってるので大丈夫かな、と言いつつ ./DIST gen 実行。あとは ./configure すれば良いのかどうか。しかし ./configure とかって久々なカンジ。デフォで /usr/local 指してるみたいなので (当たり前か) そのまんま流してみる。
む
make 失敗しとるな。
make[1]: Entering directory `/home/rms/Documents/debian/Gauche/Gauche/doc' ../src/gosh -q -I../src -I../lib -lgauche-init ./extract -en -o gauche-refe.texi ./gauche-ref.texi make[1]: ../src/gosh: Command not found make[1]: *** [gauche-refe.texi] Error 127 make[1]: Leaving directory `/home/rms/Documents/debian/Gauche/Gauche/doc' make: *** [all] Error 2
確認したところ確かに src/gosh は無い。configure にオプション渡してあげる必要があるのかどうなのか。ちょっと make な出力を保存してみるか。
エラーは以下が始点らしい。
*** ERROR: Compile Error: wrong number of arguments: reverse requires 1, but got 2 "liblist.scm":417:(define (map* fn tail-fn lis . more) ...
これ、うぶんつな 0.9.1 な Gauche を使うと微妙、ってことなのだろうか。とりあえず 0.9.2 な tar.gz 取得して。云々なのか。
0.9.2 な make が通ったら kvm の中で作業しよ。を、0.9.2 な make はパスしたな。
kvm の中で云々
qcow2 なイメージをコピィして起動。gauche と build-essential が入ってれば良いのかな。とりあえず 0.9.2 を download して make install してから、なのか。あ、git も導入しとかないとアレなのか。
を、make 正常終了してますね。やっぱ 0.9.2 な gosh が必須だったのか。あとは @hanachin_ 君の TheLittleSchemer な git リポジトリを clone して
$ git clone git://github.com/hanachin/TheLittleSchemer.git
で、失敗する試験を盛り込んで確認してみたら以下。
<fail>------------------------------------------- test fail, expects #t ==> ERROR: GOT #f failed. discrepancies found. Errors are: test fail: expects #t => got #f $ echo $? 0 $
ええと、スイッチ設定しなきゃ、なはずだな。GAUCHE_TEST_RECORD_FILE ? って入力しようと思ったらアンスコが入力できない kvm な環境。コピペもアレ。調べるか。
以下で -k ja オプション付けれ、とあったので試験したら大丈夫でした。
で、再度試験してみたんですが
$ GAUCHE_TEST_RECORD_FILE=xxx gosh 1.scm (ry <fail>------------------------------------------- test fail, expects #t ==> ERROR: GOT #f failed. discrepancies found. Errors are: test fail: expects #t => got #f $ echo $? 0 $
ぬぬ、と言いつつ commitdiff を見てみたら以下な記述があるな。
+ gosh test1.scm >> test.log + gosh test2.scm >> test.log + cat $GAUCHE_TEST_RECORD_FILE + gosh -ugauche.test -Etest-summary-check -Eexit
Makefile 作るか。
test: gosh 1.scm>test.log gosh 2.scm>>test.log cat $(GAUCHE_TEST_RECORD_FILE) gosh -ugauche.test -Etest-summary-check -Eexit
で、実行。実は色々試行錯誤してますが詳細略。
$ GAUCHE_TEST_RECORD_FILE=xxx make gosh 1.scm>test.log Testing chapter 1 ... failed. discrepancies found. Errors are: test fail: expects #t => got #f gosh 2.scm>>test.log Testing chapter 2 ... passed. cat xxx Total: 505 tests, 498 passed, 7 failed, 0 aborted. gosh -ugauche.test -Etest-summary-check -Eexit make: +++ [test] Error 1 $ echo $? 2 $
で、正常系で試験してみたのですがそもそも failed が 7 とか何だば、って思ったら出力先のファイルは削除しる必要がある模様。
試験が正常終了するケイスではステイタス 0 で終了していることを確認してます。
$ rm xxx $ GAUCHE_TEST_RECORD_FILE=xxx make gosh 1.scm>test.log Testing chapter 1 ... passed. gosh 2.scm>>test.log Testing chapter 2 ... passed. cat xxx Total: 73 tests, 73 passed, 0 failed, 0 aborted. gosh -ugauche.test -Etest-summary-check -Eexit $ echo $? 0 $
素晴しい。というか Makefile は以下な方が良いのかな。
test: rm $(GAUCHE_TEST_RECORD_FILE) gosh 1.scm>test.log gosh 2.scm>>test.log cat $(GAUCHE_TEST_RECORD_FILE) gosh -ugauche.test -Etest-summary-check -Eexit
あー、これではマズいけど (GAUCHE_TEST_RECORD_FILE が設定されてない場合)、make てきにどーすりゃ良いのかな。
以下なカンジ?
ifeq "$(GAUCHE_TEST_RECORD_FILE)" ""
とりあえず戻りの確認はできたのでこのあたりはスルーってことで (を