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-08 20:55:57 +0400
committerAles Tamchyna <a.tamchyna@gmail.com>2011-09-08 20:55:57 +0400
commita26b81cf2a7845029e09439eae6c98c7cd00a4b8 (patch)
treefec8ebcdb23e1656e5d975ac9c0eda5ca051f5d6 /cruise-control
parent37df1653b6575bbb067fac7c55a53711d741ab0e (diff)
output log/info/ok files into structured directory tree; generate info files for all new commits
Diffstat (limited to 'cruise-control')
-rwxr-xr-xcruise-control/shorten_info.pl9
-rwxr-xr-xcruise-control/test_all_new_commits.sh18
2 files changed, 23 insertions, 4 deletions
diff --git a/cruise-control/shorten_info.pl b/cruise-control/shorten_info.pl
new file mode 100755
index 000000000..beaf87e06
--- /dev/null
+++ b/cruise-control/shorten_info.pl
@@ -0,0 +1,9 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+while (<>) {
+ last if $_ =~ m/^diff --git/;
+ print $_;
+}
diff --git a/cruise-control/test_all_new_commits.sh b/cruise-control/test_all_new_commits.sh
index ec8c29cad..1927b7313 100755
--- a/cruise-control/test_all_new_commits.sh
+++ b/cruise-control/test_all_new_commits.sh
@@ -60,8 +60,8 @@ mkdir -p $LOGDIR/logs/$configname \
#### How is one test performed
function run_single_test () {
commit=$1
- longlog="$LOGDIR/logs/$configname/$commit.log"
- git show $commit > "$LOGDIR/logs/$configname/$commit.info"
+ first_char=$(echo $commit | grep -o '^.')
+ longlog="$LOGDIR/logs/$configname/$first_char/$commit.log"
warn "Testing commit $commit"
# Get the version of this script
@@ -140,20 +140,30 @@ function run_single_test () {
popd > /dev/null 2> /dev/null
if [ -z "$err" ]; then
- touch "$LOGDIR/logs/$configname/$commit.OK"
+ touch "$LOGDIR/logs/$configname/$first_char/$commit.OK"
else
return 1;
fi
}
+
+# update the revision lists for all watched branches
for i in $MCC_SCAN_BRANCHES; do
git rev-list $i > "$LOGDIR/logs/$configname/$(echo -n $i | sed 's/\//_/g').revlist"
done
+# create info files for new commits
+for i in $(git rev-list $MCC_SCAN_BRANCHES); do
+ first_char=$(echo $i | grep -o '^.')
+ [ -f "$LOGDIR/logs/$configname/$first_char/$i.info" ] && break;
+ git show $i | ./shorten_info.pl > "$LOGDIR/logs/$configname/$first_char/$i.info"
+done
+
#### Main loop over all commits
for i in $MCC_SCAN_BRANCHES; do
git rev-list $i \
| while read commit; do
- test_ok="$LOGDIR/logs/$configname/$commit.OK"
+ first_char=$(echo $commit | grep -o '^.')
+ test_ok="$LOGDIR/logs/$configname/$first_char/$commit.OK"
if [ ! -e "$test_ok" ]; then
run_single_test $commit && warn "Commit $commit test ok, stopping" && break
warn "Commit $commit test failed, continuing"