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:
authorRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2017-11-02 12:39:28 +0300
committerRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2017-11-02 12:39:28 +0300
commit26d5479499d90e8c30b277541cddd5b6a3ab5d77 (patch)
tree5acf4415af19a580b509620f089ffe64f5973ef7 /tests/decoder
parent60cb3c150e027d13502514ac72d2254b67229b4c (diff)
Add test for decoder logging
Diffstat (limited to 'tests/decoder')
-rw-r--r--tests/decoder/wmt16/.gitignore1
-rw-r--r--tests/decoder/wmt16/test_ende_logs.sh12
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/decoder/wmt16/.gitignore b/tests/decoder/wmt16/.gitignore
new file mode 100644
index 0000000..7ed66a1
--- /dev/null
+++ b/tests/decoder/wmt16/.gitignore
@@ -0,0 +1 @@
+logs.raw
diff --git a/tests/decoder/wmt16/test_ende_logs.sh b/tests/decoder/wmt16/test_ende_logs.sh
new file mode 100644
index 0000000..13e5689
--- /dev/null
+++ b/tests/decoder/wmt16/test_ende_logs.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Exit on error
+set -e
+
+# Test code goes here
+$MRT_MARIAN/build/marian-decoder -c $MRT_MODELS/wmt16_systems/marian.en-de.yml < text.in 2> logs.raw
+cat logs.raw | grep "] Best translation" | sed -r "s/.*Best translation [0-9]+ : (.*)/\1/" > logs.out
+diff logs.out text.expected > logs.diff
+
+# Exit with success code
+exit 0