Exemplo n.º 1
0
void
selftest::run_tests ()
{
  long start_time = get_run_time ();

  /* Run all the tests, in hand-coded order of (approximate) dependencies:
     run the tests for lowest-level code first.  */

  /* Low-level data structures.  */
  bitmap_c_tests ();
  et_forest_c_tests ();
  hash_map_tests_c_tests ();
  hash_set_tests_c_tests ();
  vec_c_tests ();
  pretty_print_c_tests ();
  wide_int_cc_tests ();
  ggc_tests_c_tests ();
  sreal_c_tests ();
  fibonacci_heap_c_tests ();

  /* Mid-level data structures.  */
  input_c_tests ();
  tree_c_tests ();
  gimple_c_tests ();
  rtl_tests_c_tests ();

  /* Higher-level tests, or for components that other selftests don't
     rely on.  */
  diagnostic_show_locus_c_tests ();
  diagnostic_c_tests ();
  fold_const_c_tests ();
  spellcheck_c_tests ();
  spellcheck_tree_c_tests ();
  tree_cfg_c_tests ();

  /* This one relies on most of the above.  */
  function_tests_c_tests ();

  /* Run any lang-specific selftests.  */
  lang_hooks.run_lang_selftests ();

  /* Finished running tests.  */
  long finish_time = get_run_time ();
  long elapsed_time = finish_time - start_time;

  fprintf (stderr,
	   "-fself-test: %i pass(es) in %ld.%06ld seconds\n",
	   num_passes,
	   elapsed_time / 1000000, elapsed_time % 1000000);
}
Exemplo n.º 2
0
void
selftest::run_tests ()
{
  long start_time = get_run_time ();

  /* Run all the tests, in hand-coded order of (approximate) dependencies:
     run the tests for lowest-level code first.  */

  /* Sanity-check for selftests themselves.  */
  selftest_c_tests ();

  /* Low-level data structures.  */
  bitmap_c_tests ();
  et_forest_c_tests ();
  hash_map_tests_c_tests ();
  hash_set_tests_c_tests ();
  vec_c_tests ();
  pretty_print_c_tests ();
  wide_int_cc_tests ();
  ggc_tests_c_tests ();
  sreal_c_tests ();
  fibonacci_heap_c_tests ();
  typed_splay_tree_c_tests ();

  /* Mid-level data structures.  */
  input_c_tests ();
  tree_c_tests ();
  gimple_c_tests ();
  rtl_tests_c_tests ();

  /* Higher-level tests, or for components that other selftests don't
     rely on.  */
  diagnostic_show_locus_c_tests ();
  diagnostic_c_tests ();
  edit_context_c_tests ();
  fold_const_c_tests ();
  spellcheck_c_tests ();
  spellcheck_tree_c_tests ();
  tree_cfg_c_tests ();

  /* This one relies on most of the above.  */
  function_tests_c_tests ();

  /* Run any target-specific selftests.  */
  if (targetm.run_target_selftests)
    targetm.run_target_selftests ();

  store_merging_c_tests ();

  /* Run any lang-specific selftests.  */
  lang_hooks.run_lang_selftests ();

  /* Force a GC at the end of the selftests, to shake out GC-related
     issues.  For example, if any GC-managed items have buggy (or missing)
     finalizers, this last collection will ensure that things that were
     failed to be finalized can be detected by valgrind.  */
  forcibly_ggc_collect ();

  /* Finished running tests.  */
  long finish_time = get_run_time ();
  long elapsed_time = finish_time - start_time;

  fprintf (stderr,
	   "-fself-test: %i pass(es) in %ld.%06ld seconds\n",
	   num_passes,
	   elapsed_time / 1000000, elapsed_time % 1000000);
}