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

github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsnukky <rgrundki@exceed.ed.ac.uk>2019-07-27 16:50:18 +0300
committersnukky <rgrundki@exceed.ed.ac.uk>2019-07-27 16:50:18 +0300
commit99203c63fb14157033c09ccfc44dab188690a11a (patch)
tree8a8a8da87a80ee78c13343dcd2a7291ab3803db3
parent23a521c273bc5e646d73ef700750aa9f08b182b6 (diff)
Add template script for checking error messages
-rw-r--r--tests/_template/test_error_message.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/_template/test_error_message.sh b/tests/_template/test_error_message.sh
new file mode 100644
index 0000000..8668e81
--- /dev/null
+++ b/tests/_template/test_error_message.sh
@@ -0,0 +1,23 @@
+#!/bin/bash -x
+
+#####################################################################
+# SUMMARY: A template script for testing error messages from Marian
+# AUTHOR: <your-github-username>
+#####################################################################
+
+# Exit on error
+set -e
+
+# Remove old artifacts
+rm -f error.log
+
+# Test code goes here
+$MRT_MARIAN/marian-decoder -m $MRT_MODELS/wmt16_systems/en-de/model.npz \
+ -i text.in > error.log 2>&1 || true
+
+# Check error message
+test -e error.log
+grep -q "Translating, but vocabularies are not given" error.log
+
+# Exit with success code
+exit 0