2011-11-28 19:52:53 +04:00
|
|
|
import option ;
|
|
|
|
|
|
|
|
with-regtest = [ option.get "with-regtest" ] ;
|
|
|
|
if $(with-regtest) {
|
2012-05-21 15:36:29 +04:00
|
|
|
path-constant TESTS : $(with-regtest)/tests ;
|
2011-11-28 19:52:53 +04:00
|
|
|
|
|
|
|
rule reg_test ( name : tests * : program : action ) {
|
|
|
|
alias $(name) : $(tests:D=).passed ;
|
|
|
|
for test in $(tests) {
|
|
|
|
make $(test:D=).passed : $(program) : $(action) ;
|
2011-11-28 20:01:45 +04:00
|
|
|
alias $(test) : $(test:D=).passed ;
|
2011-11-28 19:52:53 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
actions reg_test_decode {
|
|
|
|
$(TOP)/regression-testing/run-single-test.perl --decoder=$(>) --test=$(<:B) --data-dir=$(with-regtest) --test-dir=$(TESTS) && touch $(<)
|
|
|
|
}
|
2012-05-25 01:11:47 +04:00
|
|
|
reg_test phrase : [ glob $(TESTS)/phrase.* ] : ../moses-cmd/src//moses : @reg_test_decode ;
|
|
|
|
reg_test chart : [ glob $(TESTS)/chart.* : $(TESTS)/chart.hierarchical-withkenlm ] : ../moses-chart-cmd/src//moses_chart : @reg_test_decode ;
|
2011-11-28 19:52:53 +04:00
|
|
|
|
|
|
|
actions reg_test_score {
|
|
|
|
$(TOP)/regression-testing/run-test-scorer.perl --scorer=$(>) --test=$(<:B) --data-dir=$(with-regtest) --test-dir=$(TESTS) && touch $(<)
|
|
|
|
}
|
2012-06-01 19:27:59 +04:00
|
|
|
reg_test score : [ glob $(TESTS)/score.* ] : ../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=$(TESTS) && touch $(<)
|
|
|
|
}
|
|
|
|
reg_test extract : [ glob $(TESTS)/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=$(TESTS) && touch $(<)
|
|
|
|
}
|
|
|
|
reg_test extractrules : [ glob $(TESTS)/extract-rules.* : $(TESTS)/extract-rules.hierarchical ] : ../phrase-extract//extract-rules : @reg_test_extractrules ;
|
|
|
|
|
2011-11-28 19:52:53 +04:00
|
|
|
|
|
|
|
actions reg_test_mert {
|
2012-06-01 19:27:59 +04:00
|
|
|
$(TOP)/regression-testing/run-test-mert.perl --test=$(<:B) --data-dir=$(with-regtest) --test-dir=$(TESTS) && touch $(<)
|
2011-11-28 19:52:53 +04:00
|
|
|
}
|
2012-06-01 19:27:59 +04:00
|
|
|
reg_test mert : [ glob $(TESTS)/mert.* ] : ../mert//mert : @reg_test_mert ;
|
2012-05-25 01:11:47 +04:00
|
|
|
|
2012-06-01 19:27:59 +04:00
|
|
|
alias all : phrase chart mert score extract extractrules ;
|
2011-11-28 19:52:53 +04:00
|
|
|
}
|