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:
authorAles Tamchyna <a.tamchyna@gmail.com>2011-09-07 14:19:39 +0400
committerAles Tamchyna <a.tamchyna@gmail.com>2011-09-07 14:19:39 +0400
commit59e6e558c23743bdcc9e955b2ba279afa1ee3d70 (patch)
tree6a982328b8de8402cc1ec967a0963aeb7a68015b /cruise-control
parent94fa872b6da80d29e4a2bed764f59905674be1dc (diff)
checking regression test results, looping while tests fail
Diffstat (limited to 'cruise-control')
-rwxr-xr-xcruise-control/test_all_new_commits.sh26
1 files changed, 19 insertions, 7 deletions
diff --git a/cruise-control/test_all_new_commits.sh b/cruise-control/test_all_new_commits.sh
index 597687043..4b00cbdbe 100755
--- a/cruise-control/test_all_new_commits.sh
+++ b/cruise-control/test_all_new_commits.sh
@@ -109,10 +109,12 @@ function run_single_test () {
fi
echo "## regression tests" >> $longlog
- [ -z "$err" ] && ./run-test-suite.perl &>> $longlog \
- || die "Failed to run regression tests"
-
- # TODO check test-suite result
+ if [ -z "$err" ]; then
+ ./run-test-suite.perl &>> $longlog
+ regtest_status=$?
+ [ $regtest_status -eq 1 ] && die "Failed to run regression tests"
+ [ $regtest_status -eq 2 ] && err="regression tests"
+ fi
echo "## Finished" >> $longlog
date >> $longlog
@@ -129,16 +131,26 @@ function run_single_test () {
>> "$LOGDIR/brief.log"
popd > /dev/null 2> /dev/null
+
+ if [ -z "$err" ]; then
+ touch "$LOGDIR/logs/$configname/$commit.OK"
+ else
+ return 1;
+ fi
}
#### Main loop over all commits
( cd "$WORKDIR" && git rev-list $MCC_SCAN_BRANCHES ) \
| while read commit; do
- if [ ! -e "$longlog" ]; then
- run_single_test $commit || die "Testing failed, stopping the loop."
+ test_ok="$LOGDIR/logs/$configname/$commit.OK"
+ if [ ! -e "$test_ok" ]; then
+ run_single_test $commit && warn "Commit $commit test ok, stooping" && break
+ warn "Commit $commit test failed, continuing"
else
- break # don't go further in the past (may be just for development)
+ warn "Reached a successfully tested commit ($commit), stopping"
+ break
fi
done
+