diff options
author | Roman Grundkiewicz <rgrundkiewicz@gmail.com> | 2021-11-20 14:34:30 +0300 |
---|---|---|
committer | Roman Grundkiewicz <rgrundkiewicz@gmail.com> | 2021-11-20 14:34:30 +0300 |
commit | 731936ec1f932ec6ad891b0d07f255ce2b24ac4a (patch) | |
tree | 74edd1d6b6cdce5d991b357b0b9928b238d91130 | |
parent | 0aa7b6b7632732d1f22f3d8169d3262a7e6b1e9d (diff) |
Add test checking if --task fails if it got an unknown value
-rw-r--r-- | tests/interface/config/test_alias_with_unknown_value.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/interface/config/test_alias_with_unknown_value.sh b/tests/interface/config/test_alias_with_unknown_value.sh new file mode 100644 index 0000000..200b069 --- /dev/null +++ b/tests/interface/config/test_alias_with_unknown_value.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +##################################################################### +# SUMMARY: Abort if an alias does not support the option value +# AUTHOR: snukky +# TAGS: config +##################################################################### + +# Exit on error +set -e + +rm -rf alias_unk alias_unk.log +mkdir -p alias_unk + +# Run with no config file +$MRT_MARIAN/marian --task some-unknown-alias-option transformer-base --dim-rnn 32 --dim-emb 16 --after-batches 2 \ + --train-sets $MRT_DATA/europarl.de-en/corpus.bpe.{de,en} --model nonex_config/model.npz --vocabs vocab.de.yml vocab.en.yml \ + > alias_unk.log 2>&1 || true + +test -e alias_unk.log +grep -qi "unknown value.*some-unknown-alias-option.*for alias option" alias_unk.log + +# Exit with success code +exit 0 |