diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-22 20:44:55 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-22 20:44:55 +0000 |
commit | f0de13759f9d654849bb076673c5aad7dffba523 (patch) | |
tree | 31495824fb45821508ce84d9df34060ddd2ea25f | |
parent | 3efcaad4342a345713d8ba90dce6e4df0d73e4c3 (diff) |
Script to find order-dependent test failures
This script runs all (ordered) pairs of tests, and reports which pairs
result in a test failure.
-rwxr-xr-x | script/spec-all-pairs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/script/spec-all-pairs b/script/spec-all-pairs new file mode 100755 index 000000000..14e1803ba --- /dev/null +++ b/script/spec-all-pairs @@ -0,0 +1,23 @@ +#!/bin/bash + +# Try all ordered pairs of spec files, +# to winkle out order-dependent failures. + +specs=spec/*/*.rb + +for spec1 in $specs +do + seen=false + for spec2 in $specs + do + if [ "$spec1" != "$spec2" ] + then + rake db:test:purge + rake db:test:clone_structure + if ! ( script/spec "$spec1" "$spec2" ) > /dev/null + then + echo "FAILED: $spec1 $spec2" + fi + fi + done +done |