int main (int argc, char ** argv)
{
    int n;
    SRunner *sr;

    /*
     * First, the sub suite is run. This suite has failures which
     * are intentional, as the output of the failures is checked
     * in check_check_master.c. However, here we do not check if
     * the failures are expected. Instead, we just want to run
     * them and see if they leak. Because of this, the result
     * of the suite is not checked.
     */
    sr = srunner_create(make_sub_suite());
    /*
     * Enable all logging types, just in case one of them
     * leaks memory.
     */
    srunner_set_log (sr, "test_mem_leak.log");
    srunner_set_xml (sr, "test_mem_leak.xml");
    srunner_set_tap (sr, "test_mem_leak.tap");
    srunner_run_all(sr, CK_NORMAL);
    srunner_free(sr);

    /* Now, the other suite is run. These are all expected to pass. */

    /* The following setup is necessary for the fork suite */
    fork_setup();

    sr = srunner_create (make_log_suite());
    srunner_add_suite(sr, make_fork_suite());

#if defined(HAVE_FORK) && HAVE_FORK==1
    srunner_add_suite(sr, make_exit_suite());
#endif

    srunner_add_suite(sr, make_selective_suite());

    /*
     * Enable all logging types, just in case one of them
     * leaks memory.
     */
    srunner_set_log (sr, "test_mem_leak.log");
    srunner_set_xml (sr, "test_mem_leak.xml");
    srunner_set_tap (sr, "test_mem_leak.tap");

    srunner_run_all(sr, CK_NORMAL);

    /* Cleanup from the fork suite setup */
    fork_teardown();

    n = srunner_ntests_failed(sr);
    srunner_free(sr);
    return (n == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
Beispiel #2
0
int main(void)
{
  int number_failed;

  Suite *s = edc_suite();

  SRunner *sr = srunner_create(s);
  srunner_set_xml(sr, "test_results.xml");
  srunner_add_suite(sr, dgnss_management_test_suite());
  srunner_add_suite(sr, baseline_test_suite());
  srunner_add_suite(sr, amb_kf_test_suite());
  srunner_add_suite(sr, observation_test_suite());
  srunner_add_suite(sr, ambiguity_test_suite());
  srunner_add_suite(sr, rtcm3_suite());
  srunner_add_suite(sr, bits_suite());
  srunner_add_suite(sr, memory_pool_suite());
  srunner_add_suite(sr, coord_system_suite());
  srunner_add_suite(sr, linear_algebra_suite());
  srunner_add_suite(sr, filter_utils_suite());
  srunner_add_suite(sr, ephemeris_suite());
  srunner_add_suite(sr, set_suite());

  srunner_set_fork_status(sr, CK_NOFORK);
  srunner_run_all(sr, CK_NORMAL);
  number_failed = srunner_ntests_failed(sr);
  srunner_free(sr);
  return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
Beispiel #3
0
int main(void) {
  int number_failed;

  Suite *s = edc_suite();

  SRunner *sr = srunner_create(s);
  srunner_set_xml(sr, "test_results.xml");

  srunner_add_suite(sr, almanac_suite());
  srunner_add_suite(sr, bits_suite());
  srunner_add_suite(sr, edc_suite());
  srunner_add_suite(sr, ionosphere_suite());
  srunner_add_suite(sr, coord_system_suite());
  srunner_add_suite(sr, linear_algebra_suite());
  srunner_add_suite(sr, troposphere_suite());
  srunner_add_suite(sr, ephemeris_suite());
  srunner_add_suite(sr, set_suite());
  srunner_add_suite(sr, gnss_time_test_suite());
  srunner_add_suite(sr, signal_test_suite());
  srunner_add_suite(sr, glo_map_test_suite());
  srunner_add_suite(sr, shm_suite());
  srunner_add_suite(sr, pvt_test_suite());
  srunner_add_suite(sr, nav_meas_test_suite());
  srunner_add_suite(sr, sid_set_test_suite());

  srunner_set_fork_status(sr, CK_NOFORK);
  srunner_run_all(sr, CK_NORMAL);
  number_failed = srunner_ntests_failed(sr);
  srunner_free(sr);
  return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
Beispiel #4
0
int tmc_run_tests(int argc, const char **argv, Suite *s)
{
    int i;
    for (i = 1; i < argc; ++i) {
        if (strcmp(argv[i], "--print-available-points") == 0) {
            return tmc_print_available_points(stdout, '\n');
        }
    }

    FILE *points_file = fopen("tmc_available_points.txt", "wb");
    if (tmc_print_suite_points(points_file) != 0) {
        fclose(points_file);
        return EXIT_FAILURE;
    }
    if (tmc_print_test_points(points_file) != 0) {
        fclose(points_file);
        return EXIT_FAILURE;
    }
    fclose(points_file);

    SRunner *sr = srunner_create(s);
    srunner_set_xml(sr, "tmc_test_results.xml");
    srunner_run_all(sr, CK_VERBOSE);
    srunner_free(sr);

    return EXIT_SUCCESS;
}
Beispiel #5
0
/* start the test run */
gint
main (gint argc, gchar ** argv)
{
  gint nf;
  SRunner *sr;

  setup_log_base (argc, argv);
  setup_log_capture ();
  gst_init (NULL, NULL);

  bt_check_init ();
  bt_init (&test_argc, &test_argvptr);

  sr = srunner_create (gst_buzztrax_elements_suite ());
  srunner_add_suite (sr, gst_buzztrax_audiosynth_suite ());
  srunner_add_suite (sr, gst_buzztrax_combine_suite ());
  srunner_add_suite (sr, gst_buzztrax_envelope_ad_suite ());
  srunner_add_suite (sr, gst_buzztrax_envelope_adsr_suite ());
  srunner_add_suite (sr, gst_buzztrax_envelope_d_suite ());
  srunner_add_suite (sr, gst_buzztrax_filter_svf_suite ());
  srunner_add_suite (sr, gst_buzztrax_osc_synth_suite ());
  srunner_add_suite (sr, gst_buzztrax_osc_wave_suite ());
  srunner_add_suite (sr, gst_buzztrax_tempo_suite ());
  srunner_add_suite (sr, gst_buzztrax_toneconversion_suite ());
  srunner_set_xml (sr, get_suite_log_filename ());
  srunner_run_all (sr, CK_NORMAL);
  nf = srunner_ntests_failed (sr);
  srunner_free (sr);

  bt_deinit ();
  collect_logs (nf == 0);

  return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
Beispiel #6
0
int main (int argc, char *argv[]) {
    int number_failed;
    Suite *suite = log_suite();
    SRunner *runner = srunner_create(suite);
    srunner_set_xml(runner, "check-isti_log.xml");
    srunner_run_all(runner, CK_NORMAL);
    number_failed = srunner_ntests_failed(runner);
    srunner_free(runner);
    return number_failed;
}
Beispiel #7
0
static void run_tests (int printmode)
{
  SRunner *sr;

  sr = srunner_create(make_s1_suite());
  srunner_add_suite(sr, make_s2_suite());
  srunner_set_xml(sr, "test.log.xml");
  srunner_run_all(sr, printmode);
  srunner_free(sr);
}
Beispiel #8
0
int main(int argc, char *argv[]) {
	int nf;
	Suite *s = test_suite();
	SRunner *sr = srunner_create(s);
	srunner_set_xml(sr, "test_unicode.xml");
	srunner_run_all(sr, CK_VERBOSE);
	nf = srunner_ntests_failed(sr);
	srunner_free(sr);
	return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
Beispiel #9
0
int main (void)
{
	int nf;
	SRunner *sr = srunner_create(key2pho_suite());
	srunner_add_suite(sr, utf8_suite());
	srunner_add_suite(sr, mmap_suite());
	srunner_set_xml(sr, "do-test.xml");
	srunner_run_all (sr, CK_NORMAL);
	nf = srunner_ntests_failed(sr);
	srunner_free(sr);
	return (nf == 0) ? 0 : 1;
}
Beispiel #10
0
int main(void)
{
  int number_failed;
  Suite *s = edc_suite();
  SRunner *sr = srunner_create(s);
  srunner_set_xml(sr, "test_results.xml");
  srunner_add_suite(sr, sbp_suite());
  srunner_set_fork_status(sr, CK_NOFORK);
  srunner_run_all(sr, CK_NORMAL);
  number_failed = srunner_ntests_failed(sr);
  srunner_free(sr);
  return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
Beispiel #11
0
int main(void)
{
    int number_failed;
    Suite * s = signon_suite();
    SRunner * sr = srunner_create(s);

    srunner_set_xml(sr, "/tmp/result.xml");
    srunner_run_all(sr, CK_NORMAL);
    number_failed = srunner_ntests_failed(sr);
    srunner_free (sr);

    return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
/*----------------------------------------------*/
int
main (void)
{
	int f1;
	SRunner *suiteRun;

	suiteRun = srunner_create (prog_startup());
	srunner_set_xml (suiteRun, "CheckLog_prog.xml");
	srunner_run_all (suiteRun, CK_VERBOSE);
	f1 = srunner_ntests_failed (suiteRun);
	srunner_free (suiteRun);


	return f1;
}
int main(void) {
  SRunner *sr = srunner_create(gt_gtf_suite());
  srunner_add_suite (sr, gt_gtf_suite());

  // add logging to xml
  srunner_set_xml(sr, "reports/check-test-gtf.xml");
  
  // Run the suites
  srunner_run_all(sr,CK_NORMAL);
  uint32_t num_test_failed = srunner_ntests_failed(sr);
  srunner_free(sr);

  // Return unit tests
  return (num_test_failed==0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
Beispiel #14
0
int
main(int argc, char *argv[])
{
   TCase *tc;
   Suite *s;
   SRunner *sr;
   int failed_count, i;

   for (i = 1; i < argc; i++)
      if ((strcmp(argv[i], "-h") == 0) ||
          (strcmp(argv[i], "--help") == 0))
        {
           fprintf(stderr, "Usage:\n\t%s [test_case1 .. [test_caseN]]\n",
                   argv[0]);
           _list_tests();
           return 0;
        }
      else if ((strcmp(argv[i], "-l") == 0) ||
               (strcmp(argv[i], "--list") == 0))
        {
           _list_tests();
           return 0;
        }

   putenv("EFL_RUN_IN_TREE=1");

   s = suite_create("Ector");

   for (i = 0; etc[i].test_case; ++i)
     {
        if (!_use_test(argc - 1, (const char **) argv + 1, etc[i].test_case))
          continue;

        tc = tcase_create(etc[i].test_case);
        tcase_set_timeout(tc, 0);

        etc[i].build(tc);
        suite_add_tcase(s, tc);
     }

   sr = srunner_create(s);
   srunner_set_xml(sr, TESTS_BUILD_DIR "/check-results.xml");
   srunner_run_all(sr, CK_ENV);
   failed_count = srunner_ntests_failed(sr);
   srunner_free(sr);

   return (failed_count == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
Beispiel #15
0
int
main()
{
   Suite   *s;
   SRunner *sr;
   int      nbr_failed;

   s = ecore_file_tests_suite();
   sr = srunner_create(s);
   srunner_set_log(sr, "ecore_unit_tests.log");
   srunner_set_xml(sr, "ecore_unit_tests.xml");
   srunner_run_all(sr, CK_NORMAL);

   nbr_failed = srunner_ntests_failed(sr);
   srunner_free(sr);

   return (nbr_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
Beispiel #16
0
int main(void)
{
  int number_failed;

  Suite *s = edc_suite();

  SRunner *sr = srunner_create(s);
  srunner_set_xml(sr, "test_results.xml");

  srunner_add_suite(sr, rtcm3_suite());
  srunner_add_suite(sr, bits_suite());
  srunner_add_suite(sr, sbp_suite());
  srunner_add_suite(sr, coord_system_suite());
  srunner_add_suite(sr, linear_algebra_suite());

  srunner_run_all(sr, CK_NORMAL);
  number_failed = srunner_ntests_failed(sr);
  srunner_free(sr);
  return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
Beispiel #17
0
gint
gnet_check_run_suite (Suite * suite, const gchar * name, const gchar * fname)
{
  gint nf;

  SRunner *sr = srunner_create (suite);

  gnet_check_init (NULL, NULL);

  if (g_getenv ("GNET_CHECK_XML")) {
    /* how lucky we are to have __FILE__ end in .c */
    gchar *xmlfilename = g_strdup_printf ("%sheck.xml", fname);

    srunner_set_xml (sr, xmlfilename);
  }

  srunner_run_all (sr, CK_NORMAL);
  nf = srunner_ntests_failed (sr);
  srunner_free (sr);
  return nf;
}
Beispiel #18
0
int
main(int argc, char **argv)
{
   Suite *s;
   SRunner *sr;
   int i, failed_count;
   eo_init();
   setenv("CK_FORK", "no", 0);

   for (i = 1; i < argc; i++)
     if ((strcmp(argv[i], "-h") == 0) ||
	 (strcmp(argv[i], "--help") == 0))
       {
	  fprintf(stderr, "Usage:\n\t%s [test_case1 .. [test_caseN]]\n",
		  argv[0]);
	  _list_tests();
	  return 0;
       }
     else if ((strcmp(argv[i], "-l") == 0) ||
	      (strcmp(argv[i], "--list") == 0))
       {
	  _list_tests();
	  return 0;
       }

   putenv("EFL_RUN_IN_TREE=1");

   s = eo_suite_build(argc - 1, (const char **)argv + 1);
   sr = srunner_create(s);

   srunner_set_xml(sr, TESTS_BUILD_DIR "/check-results.xml");

   srunner_run_all(sr, CK_ENV);
   failed_count = srunner_ntests_failed(sr);
   srunner_free(sr);

   eo_shutdown();

   return (failed_count == 0) ? 0 : 255;
}
Beispiel #19
0
/* start the test run */
gint
main (gint argc, gchar ** argv)
{
  gint nf;
  SRunner *sr;

  setup_log_base (argc, argv);
  setup_log_capture ();

  bt_check_init ();

  sr = srunner_create (bml_core_suite ());
  srunner_add_suite (sr, bml_class_suite ());
  srunner_set_xml (sr, get_suite_log_filename ());
  srunner_run_all (sr, CK_NORMAL);
  nf = srunner_ntests_failed (sr);
  srunner_free (sr);

  collect_logs (nf == 0);

  return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
Beispiel #20
0
int main(int argc, char *argv[])
{
  int i, failed = 0, selected = 0;
  int threading, single_thread, multi_thread;
  char const *xml = NULL;
  Suite *suite = suite_create("Unit tests for Sofia-SIP UA Engine");
  SRunner *runner;

  s2_tester = "check_nua";

  s2_suite("N2");

  if (getenv("CHECK_NUA_VERBOSE"))
    s2_start_stop = strtoul(getenv("CHECK_NUA_VERBOSE"), NULL, 10);

  for (i = 1; argv[i]; i++) {
    if (su_strnmatch(argv[i], "--xml=", strlen("--xml="))) {
      xml = argv[i] + strlen("--xml=");
    }
    else if (su_strmatch(argv[i], "--xml")) {
      if (!(xml = argv[++i]))
	usage(2);
    }
    else if (su_strmatch(argv[i], "-v")) {
      s2_start_stop = 1;
    }
    else if (su_strmatch(argv[i], "-?") ||
	     su_strmatch(argv[i], "-h") ||
	     su_strmatch(argv[i], "--help"))
      usage(0);
    else {
      s2_select_tests(argv[i]);
      selected = 1;
    }
  }

  if (!selected)
    s2_select_tests(getenv("CHECK_NUA_CASES"));

  if (getenv("CHECK_NUA_THREADING")) {
    single_thread = strcmp(getenv("CHECK_NUA_THREADING"), "no");
    multi_thread = !single_thread;
  }
  else {
    single_thread = multi_thread = 1;
  }

  if (single_thread) {
    check_register_cases(suite, threading = 0);
    check_simple_cases(suite, threading = 0);
    check_session_cases(suite, threading = 0);
    check_etsi_cases(suite, threading = 0);
  }

  if (multi_thread) {
    check_register_cases(suite, threading = 1);
    check_session_cases(suite, threading = 1);
    check_etsi_cases(suite, threading = 1);
    check_simple_cases(suite, threading = 1);
  }

  runner = srunner_create(suite);

  if (xml)
    srunner_set_xml(runner, argv[1]);

  srunner_run_all(runner, CK_ENV);
  failed = srunner_ntests_failed(runner);
  srunner_free(runner);

  exit(failed ? EXIT_FAILURE : EXIT_SUCCESS);
}