Skip to content

Instantly share code, notes, and snippets.

@clemensp
Created August 2, 2011 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clemensp/1120614 to your computer and use it in GitHub Desktop.
Save clemensp/1120614 to your computer and use it in GitHub Desktop.
Locally re-run all the test files that failed during the last hydra run
# locally run files that failed during hydra
Rake::TestTask.new("run_failed_files_locally") do |t|
hydra_heuristics_file = "/tmp/hydra_heuristics.yml"
report = YAML.load_file(hydra_heuristics_file) if File.exists? hydra_heuristics_file
failed_files = []
if report
failed_files = report.select{|file,stats| stats["all_tests_passed_last_run"] == false}.map(&:first)
failed_files = failed_files.select{|file| File.exists?(file)}
end
t.test_files = failed_files
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment