mosesdecoder/regression-testing/Jamfile

54 lines
2.4 KiB
Plaintext
Raw Normal View History

import option path ;
with-regtest = [ option.get "with-regtest" ] ;
if $(with-regtest) {
with-regtest = [ path.root $(with-regtest) [ path.pwd ] ] ;
} else if [ option.get "with-regtest" : : "yes" ] {
shell_or_fail "git submodule init" ;
shell_or_fail "git submodule update" ;
with-regtest = $(TOP)/regression-testing/tests ;
}
if $(with-regtest) {
test-dir = $(with-regtest)/tests ;
rule reg_test ( name : tests * : programs * : action ) {
alias $(name) : $(tests:D=).passed ;
for test in $(tests) {
make $(test:D=).passed : $(programs) : $(action) ;
2011-11-28 20:01:45 +04:00
alias $(test) : $(test:D=).passed ;
}
}
actions reg_test_decode {
$(TOP)/regression-testing/run-single-test.perl --decoder=$(>) --test=$(<:B) --data-dir=$(with-regtest) --test-dir=$(test-dir) && touch $(<)
}
reg_test phrase : [ glob $(test-dir)/phrase.* ] : ../moses-cmd/src//moses : @reg_test_decode ;
reg_test chart : [ glob $(test-dir)/chart.* ] : ../moses-chart-cmd/src//moses_chart : @reg_test_decode ;
actions reg_test_score {
$(TOP)/regression-testing/run-test-scorer.perl --scorer=$(>) --test=$(<:B) --data-dir=$(with-regtest) --test-dir=$(test-dir) && touch $(<)
}
2012-09-18 17:06:03 +04:00
reg_test score : [ glob $(test-dir)/score.* : $(test-dir)/score.phrase-based-with-alignment-inv $(test-dir)/score.phrase-based-inv $(test-dir)/score.phrase-based-with-alignment $(test-dir)/score.phrase-based ] : ../phrase-extract//score : @reg_test_score ;
actions reg_test_extract {
$(TOP)/regression-testing/run-test-extract.perl --extractor=$(>) --test=$(<:B) --data-dir=$(with-regtest) --test-dir=$(test-dir) && touch $(<)
}
reg_test extract : [ glob $(test-dir)/extract.* ] : ../phrase-extract//extract : @reg_test_extract ;
actions reg_test_extractrules {
$(TOP)/regression-testing/run-test-extract.perl --extractor=$(>) --test=$(<:B) --data-dir=$(with-regtest) --test-dir=$(test-dir) && touch $(<)
}
reg_test extractrules : [ glob $(test-dir)/extract-rules.* : $(with-regtest)/extract-rules.hierarchical ] : ../phrase-extract//extract-rules : @reg_test_extractrules ;
pwd = [ path.pwd ] ;
actions reg_test_mert {
$(TOP)/regression-testing/run-test-mert.perl --test=$(<:B) --data-dir=$(with-regtest) --test-dir=$(test-dir) --bin-dir=$(pwd)/$(>:D) && touch $(<)
}
2012-10-08 20:33:58 +04:00
reg_test mert : [ glob $(test-dir)/mert.* ] : ../mert//mert ../mert//extractor ../mert//pro : @reg_test_mert ;
2012-09-18 17:06:03 +04:00
alias all : phrase chart mert score extract extractrules ;
}