diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-06-04 15:03:02 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-06-04 15:03:02 +0100 |
commit | a885764b65916020d9182073b38f6951a20d4b8c (patch) | |
tree | 0988651c144b65a8e46b28b376b2e72a5947d934 /script/spec-all-pairs | |
parent | eb1c465162420ad62c16dccb983cb28aa89a4639 (diff) | |
parent | a919141992a40599f99b32bd4a8312a0009f3f7a (diff) |
Merge branch 'release/0.11'0.11.0.3
Diffstat (limited to 'script/spec-all-pairs')
-rwxr-xr-x | script/spec-all-pairs | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/script/spec-all-pairs b/script/spec-all-pairs deleted file mode 100755 index 6d7bb17c4..000000000 --- a/script/spec-all-pairs +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -# Try all ordered pairs of spec files, -# to winkle out order-dependent failures. - -log_file=/dev/null - -test_pair () { - bundle exec rake db:test:prepare > /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 -} - -all_pairs() { - specs=spec/*/*.rb - - for spec1 in $specs - do - all_okay=true - for spec2 in $specs - do - if ! test_pair "$spec1" "$spec2" - then - all_okay=false - fi - done - done - - $all_okay - return $? -} - -pairs_from_stdin() { - all_okay=true - while read line - do - case "$line" in - \*\ FAILED:\ *|\ - spec/*.rb\ spec/*.rb) - line=${line#\* FAILED: } - if ! test_pair $line - then - all_okay=false - fi - ;; - *) - echo "No match: $line" - ;; - esac - done - - $all_okay - return $? -} - -if [ "$1" = --log ] -then - shift - log_file=$1 - shift - cp /dev/null "$log_file" -fi -if [ "$1" = "-" ] -then - pairs_from_stdin -else - all_pairs -fi -exit $? |