diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-02-03 12:51:59 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-02-03 12:51:59 +0000 |
commit | 2e57ede47a4b37d9d814d7686b50443c4b74f124 (patch) | |
tree | 6cd8d7adc49c759165412e12581af286fcd025d6 /script/spec-all-pairs | |
parent | e13dbbdccfd3550076469e83536b8bd10315a26b (diff) | |
parent | 43c5b1d2a873e6dfeb3da35f0b3b541895c8a782 (diff) |
Merge branch 'release/0.5' of github.com:sebbacon/alaveteli into release/0.5
Diffstat (limited to 'script/spec-all-pairs')
-rwxr-xr-x | script/spec-all-pairs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/script/spec-all-pairs b/script/spec-all-pairs index e8fa77be9..5b6439a4e 100755 --- a/script/spec-all-pairs +++ b/script/spec-all-pairs @@ -3,13 +3,21 @@ # Try all ordered pairs of spec files, # to winkle out order-dependent failures. +log_file=/dev/null + test_pair () { rake db:test:prepare > /dev/null 2>&1 - if script/spec "$1" "$2" > /dev/null 2>&1 + output=$(script/spec "$1" "$2" 2>&1) + if [ $? -eq 0 ] then echo "OK: $1 $2" return 0 else + echo >> "$log_file" "FAILED: $1 $2" + echo >> "$log_file" "=======================================" + echo >> "$log_file" "$output" + echo >> "$log_file" + echo "FAILED: $1 $2" return 1 fi @@ -57,6 +65,13 @@ pairs_from_stdin() { return $? } +if [ "$1" = --log ] +then + shift + log_file=$1 + shift + cp /dev/null "$log_file" +fi if [ "$1" = "-" ] then pairs_from_stdin |