let add_test_results conf all_test_results state =
  let ((test_path, _, _), _) = all_test_results in
  let state =
    {state with
         tests_passed = all_test_results :: state.tests_passed;
         tests_planned = filter_out test_path state.tests_planned};
  in
    maybe_dump_cache conf state