Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbojar <bojar@1f5c12ca-751b-0410-a591-d2e778427230>2006-08-14 21:36:36 +0400
committerbojar <bojar@1f5c12ca-751b-0410-a591-d2e778427230>2006-08-14 21:36:36 +0400
commit0241f2fc5f0aa1932e21a460486f3ea88d0dec37 (patch)
tree82fba32123c17a7bf6544e99c508f59959c92fa5 /scripts/tests
parentf0a5eb167eedbca1e352ff10d2843bf8d8499967 (diff)
better explanation in README, fixed test preparation in tests/train-factored-test-step3.test
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@727 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'scripts/tests')
-rw-r--r--scripts/tests/README26
-rwxr-xr-xscripts/tests/mert-moses-parallel.test5
-rwxr-xr-xscripts/tests/mert-moses-serial.test5
-rwxr-xr-xscripts/tests/train-factored-test-step3.test7
-rwxr-xr-xscripts/tests/train-factored-test-step9.test5
5 files changed, 43 insertions, 5 deletions
diff --git a/scripts/tests/README b/scripts/tests/README
index 974cc65a2..2d1db6908 100644
--- a/scripts/tests/README
+++ b/scripts/tests/README
@@ -1,4 +1,28 @@
+==== Running the tests:
+
All *.test files here are run by ../Makefile.
-The tests should assume, that they are launched in a fresh directory:
+Please do not run them from here, as they should depend some variables set by the ../Makefile
+
+To run all tests, issue:
+ make tests
+ !! in the scripts directory
+
+Ro tun a single test, issue:
+ make tests/TESTNAME.test.run
+ !! in the scripts directory
+
+ Example:
+ make tests/train-factored-test-step3.test.run
+
+
+
+==== Building new tests
+
+Each of the test should assume that it is launched in a fresh directory:
tests/TESTNAME.test.TIMESTAMP/
+
+The test should prepare any files needed and then should test what there is to test.
+
+The best way is to make a copy of an older test, rename, modify and add to the CVS.
+
diff --git a/scripts/tests/mert-moses-parallel.test b/scripts/tests/mert-moses-parallel.test
index 4b6f63cf3..a6228ed68 100755
--- a/scripts/tests/mert-moses-parallel.test
+++ b/scripts/tests/mert-moses-parallel.test
@@ -18,4 +18,7 @@ cp $DATADIR/dev.ref ./ || exit 1
echo "Starting mert-moses"
-$SCRIPTS_ROOTDIR/training/mert-moses.pl --jobs=10 dev.input dev.ref $MOSESCMD ./moses.ini
+$SCRIPTS_ROOTDIR/training/mert-moses.pl --jobs=10 dev.input dev.ref $MOSESCMD ./moses.ini \
+|| exit 1
+
+echo "Success"
diff --git a/scripts/tests/mert-moses-serial.test b/scripts/tests/mert-moses-serial.test
index 6e22ed5d8..29c7b199f 100755
--- a/scripts/tests/mert-moses-serial.test
+++ b/scripts/tests/mert-moses-serial.test
@@ -14,4 +14,7 @@ cp $DATADIR/dev.ref ./ || exit 1
echo "Starting mert-moses"
-$SCRIPTS_ROOTDIR/training/mert-moses.pl dev.input dev.ref $MOSESCMD ./moses.ini
+$SCRIPTS_ROOTDIR/training/mert-moses.pl dev.input dev.ref $MOSESCMD ./moses.ini \
+|| exit 1
+
+echo "Success"
diff --git a/scripts/tests/train-factored-test-step3.test b/scripts/tests/train-factored-test-step3.test
index 01316cc1b..cf0648de8 100755
--- a/scripts/tests/train-factored-test-step3.test
+++ b/scripts/tests/train-factored-test-step3.test
@@ -5,6 +5,9 @@ echo "Workspace: $WORKSPACE"
export SCRIPTS_ROOTDIR=$WORKSPACE/scripts
+cp -r ../epps-sample ./corpus || exit 1
+echo "Copied epps-sample files"
+
echo "Starting training script."
$SCRIPTS_ROOTDIR/training/train-factored-phrase-model.perl \
@@ -14,5 +17,7 @@ $SCRIPTS_ROOTDIR/training/train-factored-phrase-model.perl \
--first-step 3 \
--last-step 3 \
--corpus corpus \
- --root corpus
+ --root corpus \
+ || exit 1
+echo "Success."
diff --git a/scripts/tests/train-factored-test-step9.test b/scripts/tests/train-factored-test-step9.test
index 1c7c8a68f..06fef86de 100755
--- a/scripts/tests/train-factored-test-step9.test
+++ b/scripts/tests/train-factored-test-step9.test
@@ -20,4 +20,7 @@ $SCRIPTS_ROOTDIR/training/train-factored-phrase-model.perl \
--decoding-steps t0,g0,t1,g1,g2 \
--translation-factors 0-0+1-1 \
--generation-factors 0-0+0-1+0,1-2 \
- --first-step 9
+ --first-step 9 \
+ || exit 1
+
+echo "Success"