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:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-12-07 15:01:18 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-12-07 15:14:19 +0300
commit3eccbeaf2b36997ed527603115bf95cd8072479f (patch)
treeace95ff4a3b9c9a5e35cb0744e3693b70a41720f /run-regtests.sh
parent42e3caacac2fa4da98cc7e42886fb5069dbbb802 (diff)
Reworked run-regtests.sh
Diffstat (limited to 'run-regtests.sh')
-rwxr-xr-xrun-regtests.sh80
1 files changed, 70 insertions, 10 deletions
diff --git a/run-regtests.sh b/run-regtests.sh
index 2da47ec79..3fbdc0caf 100755
--- a/run-regtests.sh
+++ b/run-regtests.sh
@@ -2,21 +2,81 @@
# this script assumes that all 3rd-party dependencies are installed under ./opt
# you can install all 3rd-party dependencies by running make -f contrib/Makefiles/install-dependencies.gmake
-set -e -o pipefail -x
+set -e -o pipefail
opt=$(pwd)/opt
+
+args=$(getopt -oj:aq -lwith-irstlm:,with-boost:,with-cmph:,with-regtest:,no-server,with-xmlrpc-c:,full -- "$@")
+eval set -- "$args"
+
+# default settings
+noserver=false;
+full=false;
+j=$(getconf _NPROCESSORS_ONLN)
+irstlm=$opt
+boost=$opt
+cmph=$opt
+xmlrpc=$opt
+regtest=$(pwd)/regtest
+unset q
+unset a
+# the regression test for the compactpt bug is currently know to fail,
+# let's skip it for the time being
+skipcompact=--regtest-skip-compactpt
+
+# overrides from command line
+while true ; do
+ case "$1" in
+ -j ) j=$2; shift 2 ;;
+ -a ) a=-a; shift ;;
+ -q ) q=-q; shift ;;
+ --with-irstlm ) irstlm=$2; shift 2 ;;
+ --with-boost ) boost=$2; shift 2 ;;
+ --with-cmph ) cmph=$2; shift 2 ;;
+ --with-regtest ) regtest=$2; shift 2 ;;
+ --no-server ) noserver=true; shift 2 ;;
+ --with-xmlrpc-c ) xmlrpc=$2; shift 2 ;;
+ --full ) full=true; shift 2 ;;
+ -- ) shift; break ;;
+ * ) break ;;
+ esac
+done
+
+if [ $? != 0 ] ; then exit $?; fi
+
git submodule init
git submodule update regtest
-if [ "$RECOMPILE" == "NO" ] ; then
- RECOMPILE=
+
+# full test means
+# -- compile from scratch without server, run regtests
+# -- compile from scratch with server, run regtests
+set -x
+if [ "$full" == true ] ; then
+ ./bjam -j$j --with-irstlm=$irstlm --with-boost=$boost --with-cmph=$cmph --no-xmlrpc-c --with-regtest=$regtest -a $skipcompact $@ $q || exit $?
+ if ./regression-testing/run-single-test.perl --server --startuptest ; then
+ ./bjam -j$j --with-irstlm=$irstlm --with-boost=$boost --with-cmph=$cmph --with-xmlrpc-c=$xmlrpc --with-regtest=$regtest -a $skipcompact $@ $q
+ fi
else
- RECOMPILE="-a"
+ # when investigating failures, always run single-threaded
+ if [ "$q" == "-q" ] ; then j=1; fi
+
+ if ./regression-testing/run-single-test.perl --server --startuptest ; then
+ ./bjam -j$j $q $a --with-irstlm=$irstlm --with-boost=$boost --with-cmph=$cmph --with-xmlrpc-c=$xmlrpc --with-regtest=$regtest $skipcompact $@
+ else
+ ./bjam -j$j $q $a --with-irstlm=$irstlm --with-boost=$boost --with-cmph=$cmph --no-xmlrpc-c --with-regtest=$regtest $skipcompact $@
+ fi
fi
-# test compilation without xmlrpc-c
-# ./bjam -j$(nproc) --with-irstlm=$opt --with-boost=$opt --with-cmph=$opt --no-xmlrpc-c --with-regtest=$(pwd)/regtest -a -q $@ || exit $?
+# if [ "$RECOMPILE" == "NO" ] ; then
+# RECOMPILE=
+# else
+# RECOMPILE="-a"
+# fi
-# test compilation with xmlrpc-c
-if ./regression-testing/run-single-test.perl --server --startuptest ; then
- ./bjam -j$(nproc) --with-irstlm=$opt --with-boost=$opt --with-cmph=$opt --with-xmlrpc-c=$opt --with-regtest=$(pwd)/regtest $RECOMPILE -q $@
-fi
+# # test compilation without xmlrpc-c
+# # ./bjam -j$(nproc) --with-irstlm=$opt --with-boost=$opt --with-cmph=$opt --no-xmlrpc-c --with-regtest=$(pwd)/regtest -a -q $@ || exit $?
+
+# # test compilation with xmlrpc-c
+# if ./regression-testing/run-single-test.perl --server --startuptest ; then
+# ./bjam -j$(nproc) --with-irstlm=$opt --with-boost=$opt --with-cmph=$opt --with-xmlrpc-c=$opt --with-regtest=$(pwd)/regtest $RECOMPILE -q --regtest-skip-compactpt $@
+# fi