Ticket #3986: mc-3986-tests-donot-write-parallel-to-logfile.patch

File mc-3986-tests-donot-write-parallel-to-logfile.patch, 48.4 KB (added by and, 4 years ago)
  • tests/lib/library_independ.c

    From aba55ecfbd5841903baef08d45d170217e80533b Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Wed, 30 Dec 2020 15:23:26 +0000
    Subject: [PATCH] (make tests) do not write parallel to logfile
    
    Since automake-1.12 (test-driver script) libcheck logfile is written parallel by automake.
    Print test logging to stdout and let write to logfile by automake only.
    
    (maybe update INSTALL to inform about optimal automake version for make tests)
    
    Fix #3986
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     tests/lib/library_independ.c                  | 11 +----------
     tests/lib/mc_build_filename.c                 | 12 +-----------
     tests/lib/mc_realpath.c                       | 12 +-----------
     tests/lib/mcconfig/config_string.c            | 12 +-----------
     tests/lib/mcconfig/user_configs_path.c        | 12 +-----------
     tests/lib/name_quote.c                        | 12 +-----------
     tests/lib/search/glob_prepare_replace_str.c   | 12 +-----------
     tests/lib/search/glob_translate_to_regex.c    | 12 +-----------
     tests/lib/search/hex_translate_to_regex.c     | 12 +-----------
     .../search/regex_process_escape_sequence.c    | 12 +-----------
     tests/lib/search/regex_replace_esc_seq.c      | 12 +-----------
     .../search/translate_replace_glob_to_regex.c  | 12 +-----------
     tests/lib/serialize.c                         | 12 +-----------
     tests/lib/strutil/filevercmp.c                | 12 +-----------
     tests/lib/strutil/parse_integer.c             | 12 +-----------
     tests/lib/strutil/replace__str_replace_all.c  | 12 +-----------
     tests/lib/strutil/str_verscmp.c               | 12 +-----------
     tests/lib/utilunix__my_system-fork_child.c    | 12 +-----------
     .../utilunix__my_system-fork_child_shell.c    | 12 +-----------
     tests/lib/utilunix__my_system-fork_fail.c     | 12 +-----------
     tests/lib/vfs/canonicalize_pathname.c         | 12 +-----------
     tests/lib/vfs/current_dir.c                   | 12 +-----------
     tests/lib/vfs/path_cmp.c                      | 12 +-----------
     tests/lib/vfs/path_len.c                      | 12 +-----------
     tests/lib/vfs/path_manipulations.c            | 12 +-----------
     tests/lib/vfs/path_recode.c                   | 12 +-----------
     tests/lib/vfs/path_serialize.c                | 12 +-----------
     tests/lib/vfs/relative_cd.c                   | 12 +-----------
     tests/lib/vfs/tempdir.c                       | 12 +-----------
     tests/lib/vfs/vfs_adjust_stat.c               | 12 +-----------
     tests/lib/vfs/vfs_get_encoding.c              | 12 +-----------
     tests/lib/vfs/vfs_parse_ls_lga.c              | 12 +-----------
     tests/lib/vfs/vfs_path_from_str_flags.c       | 12 +-----------
     tests/lib/vfs/vfs_path_string_convert.c       | 12 +-----------
     tests/lib/vfs/vfs_prefix_to_class.c           | 12 +-----------
     tests/lib/vfs/vfs_s_get_path.c                | 12 +-----------
     tests/lib/vfs/vfs_setup_cwd.c                 | 12 +-----------
     tests/lib/vfs/vfs_split.c                     | 12 +-----------
     tests/lib/widget/complete_engine.c            | 12 +-----------
     tests/lib/widget/group_init_destroy.c         | 14 +++-----------
     tests/lib/widget/hotkey_equal.c               | 12 +-----------
     tests/lib/widget/widget_find_by_id.c          | 14 +++-----------
     tests/lib/x_basename.c                        | 12 +-----------
     tests/mctest.h                                | 19 +++++++++++++++++++
     44 files changed, 66 insertions(+), 472 deletions(-)
    
    diff --git a/tests/lib/library_independ.c b/tests/lib/library_independ.c
    index 616d6af35..6d1b7a766 100644
    a b END_TEST 
    4343int 
    4444main (void) 
    4545{ 
    46     int number_failed; 
    47  
    48     Suite *s = suite_create (TEST_SUITE_NAME); 
    4946    TCase *tc_core = tcase_create ("Core"); 
    50     SRunner *sr; 
    5147 
    5248    /* Add new tests here: *************** */ 
    5349    tcase_add_test (tc_core, test_library_independ); 
    5450    /* *********************************** */ 
    5551 
    56     suite_add_tcase (s, tc_core); 
    57     sr = srunner_create (s); 
    58     srunner_run_all (sr, CK_ENV); 
    59     number_failed = srunner_ntests_failed (sr); 
    60     srunner_free (sr); 
    61     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     52    return mctest_run_all(tc_core); 
    6253} 
    6354 
    6455/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/mc_build_filename.c

    diff --git a/tests/lib/mc_build_filename.c b/tests/lib/mc_build_filename.c
    index 0b6b7a4cc..13488da3f 100644
    a b END_PARAMETRIZED_TEST 
    134134int 
    135135main (void) 
    136136{ 
    137     int number_failed; 
    138  
    139     Suite *s = suite_create (TEST_SUITE_NAME); 
    140137    TCase *tc_core = tcase_create ("Core"); 
    141     SRunner *sr; 
    142138 
    143139    tcase_add_checked_fixture (tc_core, setup, teardown); 
    144140 
    main (void) 
    146142    mctest_add_parameterized_test (tc_core, test_mc_build_filename, test_mc_build_filename_ds); 
    147143    /* *********************************** */ 
    148144 
    149     suite_add_tcase (s, tc_core); 
    150     sr = srunner_create (s); 
    151     srunner_set_log (sr, "mc_build_filename.log"); 
    152     srunner_run_all (sr, CK_ENV); 
    153     number_failed = srunner_ntests_failed (sr); 
    154     srunner_free (sr); 
    155     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     145    return mctest_run_all(tc_core); 
    156146} 
    157147 
    158148/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/mc_realpath.c

    diff --git a/tests/lib/mc_realpath.c b/tests/lib/mc_realpath.c
    index 31415ac85..31707a9e0 100644
    a b END_PARAMETRIZED_TEST 
    109109int 
    110110main (void) 
    111111{ 
    112     int number_failed; 
    113112    char *cwd; 
    114  
    115     Suite *s = suite_create (TEST_SUITE_NAME); 
    116113    TCase *tc_core = tcase_create ("Core"); 
    117     SRunner *sr; 
    118114 
    119115    /* writable directory where check creates temporary files */ 
    120116    cwd = g_get_current_dir (); 
    main (void) 
    127123    mctest_add_parameterized_test (tc_core, realpath_test, data_source); 
    128124    /* *********************************** */ 
    129125 
    130     suite_add_tcase (s, tc_core); 
    131     sr = srunner_create (s); 
    132     srunner_set_log (sr, "mc_realpath.log"); 
    133     srunner_run_all (sr, CK_ENV); 
    134     number_failed = srunner_ntests_failed (sr); 
    135     srunner_free (sr); 
    136     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     126    return mctest_run_all(tc_core); 
    137127} 
    138128 
    139129/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/mcconfig/config_string.c

    diff --git a/tests/lib/mcconfig/config_string.c b/tests/lib/mcconfig/config_string.c
    index da479de59..a04c2e12f 100644
    a b END_TEST 
    238238int 
    239239main (void) 
    240240{ 
    241     int number_failed; 
    242  
    243     Suite *s = suite_create (TEST_SUITE_NAME); 
    244241    TCase *tc_core = tcase_create ("Core"); 
    245     SRunner *sr; 
    246242 
    247243    tcase_add_checked_fixture (tc_core, setup, teardown); 
    248244 
    main (void) 
    251247    tcase_add_test (tc_core, emulate__learn_save); 
    252248    /* *********************************** */ 
    253249 
    254     suite_add_tcase (s, tc_core); 
    255     sr = srunner_create (s); 
    256     srunner_set_log (sr, "config_string.log"); 
    257     srunner_run_all (sr, CK_ENV); 
    258     number_failed = srunner_ntests_failed (sr); 
    259     srunner_free (sr); 
    260     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     250    return mctest_run_all(tc_core); 
    261251} 
    262252 
    263253/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/mcconfig/user_configs_path.c

    diff --git a/tests/lib/mcconfig/user_configs_path.c b/tests/lib/mcconfig/user_configs_path.c
    index 75e483e7f..af8bb5c84 100644
    a b END_PARAMETRIZED_TEST 
    211211int 
    212212main (void) 
    213213{ 
    214     int number_failed; 
    215  
    216     Suite *s = suite_create (TEST_SUITE_NAME); 
    217214    TCase *tc_core = tcase_create ("Core"); 
    218     SRunner *sr; 
    219215 
    220216    tcase_add_checked_fixture (tc_core, setup, teardown); 
    221217 
    main (void) 
    223219    mctest_add_parameterized_test (tc_core, test_user_config_paths, test_user_config_paths_ds); 
    224220    /* *********************************** */ 
    225221 
    226     suite_add_tcase (s, tc_core); 
    227     sr = srunner_create (s); 
    228     srunner_set_log (sr, "user_configs_path.log"); 
    229     srunner_run_all (sr, CK_ENV); 
    230     number_failed = srunner_ntests_failed (sr); 
    231     srunner_free (sr); 
    232     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     222    return mctest_run_all(tc_core); 
    233223} 
    234224 
    235225/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/name_quote.c

    diff --git a/tests/lib/name_quote.c b/tests/lib/name_quote.c
    index eb5056d7d..e3c7a3a82 100644
    a b END_PARAMETRIZED_TEST 
    128128int 
    129129main (void) 
    130130{ 
    131     int number_failed; 
    132  
    133     Suite *s = suite_create (TEST_SUITE_NAME); 
    134131    TCase *tc_core = tcase_create ("Core"); 
    135     SRunner *sr; 
    136132 
    137133    tcase_add_checked_fixture (tc_core, setup, teardown); 
    138134 
    main (void) 
    141137    mctest_add_parameterized_test (tc_core, name_quote_test, data_source2); 
    142138    /* *********************************** */ 
    143139 
    144     suite_add_tcase (s, tc_core); 
    145     sr = srunner_create (s); 
    146     srunner_set_log (sr, "name_quote.log"); 
    147     srunner_run_all (sr, CK_ENV); 
    148     number_failed = srunner_ntests_failed (sr); 
    149     srunner_free (sr); 
    150     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     140    return mctest_run_all(tc_core); 
    151141} 
    152142 
    153143/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/search/glob_prepare_replace_str.c

    diff --git a/tests/lib/search/glob_prepare_replace_str.c b/tests/lib/search/glob_prepare_replace_str.c
    index ed6adaf13..fc884a784 100644
    a b END_PARAMETRIZED_TEST 
    9494int 
    9595main (void) 
    9696{ 
    97     int number_failed; 
    98  
    99     Suite *s = suite_create (TEST_SUITE_NAME); 
    10097    TCase *tc_core = tcase_create ("Core"); 
    101     SRunner *sr; 
    10298 
    10399    /* Add new tests here: *************** */ 
    104100    mctest_add_parameterized_test (tc_core, test_glob_prepare_replace_str, 
    105101                                   test_glob_prepare_replace_str_ds); 
    106102    /* *********************************** */ 
    107103 
    108     suite_add_tcase (s, tc_core); 
    109     sr = srunner_create (s); 
    110     srunner_set_log (sr, "glob_prepare_replace_str.log"); 
    111     srunner_run_all (sr, CK_ENV); 
    112     number_failed = srunner_ntests_failed (sr); 
    113     srunner_free (sr); 
    114     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     104    return mctest_run_all(tc_core); 
    115105} 
    116106 
    117107/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/search/glob_translate_to_regex.c

    diff --git a/tests/lib/search/glob_translate_to_regex.c b/tests/lib/search/glob_translate_to_regex.c
    index bee8d39fa..03999e9e9 100644
    a b END_PARAMETRIZED_TEST 
    106106int 
    107107main (void) 
    108108{ 
    109     int number_failed; 
    110  
    111     Suite *s = suite_create (TEST_SUITE_NAME); 
    112109    TCase *tc_core = tcase_create ("Core"); 
    113     SRunner *sr; 
    114110 
    115111    /* Add new tests here: *************** */ 
    116112    mctest_add_parameterized_test (tc_core, test_glob_translate_to_regex, 
    117113                                   test_glob_translate_to_regex_ds); 
    118114    /* *********************************** */ 
    119115 
    120     suite_add_tcase (s, tc_core); 
    121     sr = srunner_create (s); 
    122     srunner_set_log (sr, "glob_translate_to_regex.log"); 
    123     srunner_run_all (sr, CK_ENV); 
    124     number_failed = srunner_ntests_failed (sr); 
    125     srunner_free (sr); 
    126     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     116    return mctest_run_all(tc_core); 
    127117} 
    128118 
    129119/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/search/hex_translate_to_regex.c

    diff --git a/tests/lib/search/hex_translate_to_regex.c b/tests/lib/search/hex_translate_to_regex.c
    index c40ee3122..b6572c77c 100644
    a b END_PARAMETRIZED_TEST 
    181181int 
    182182main (void) 
    183183{ 
    184     int number_failed; 
    185  
    186     Suite *s = suite_create (TEST_SUITE_NAME); 
    187184    TCase *tc_core = tcase_create ("Core"); 
    188     SRunner *sr; 
    189185 
    190186    /* Add new tests here: *************** */ 
    191187    mctest_add_parameterized_test (tc_core, test_hex_translate_to_regex, 
    192188                                   test_hex_translate_to_regex_ds); 
    193189    /* *********************************** */ 
    194190 
    195     suite_add_tcase (s, tc_core); 
    196     sr = srunner_create (s); 
    197     srunner_set_log (sr, "hex_translate_to_regex.log"); 
    198     srunner_run_all (sr, CK_ENV); 
    199     number_failed = srunner_ntests_failed (sr); 
    200     srunner_free (sr); 
    201     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     191    return mctest_run_all(tc_core); 
    202192} 
    203193 
    204194/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/search/regex_process_escape_sequence.c

    diff --git a/tests/lib/search/regex_process_escape_sequence.c b/tests/lib/search/regex_process_escape_sequence.c
    index 6511b397d..f04200123 100644
    a b END_PARAMETRIZED_TEST 
    140140int 
    141141main (void) 
    142142{ 
    143     int number_failed; 
    144  
    145     Suite *s = suite_create (TEST_SUITE_NAME); 
    146143    TCase *tc_core = tcase_create ("Core"); 
    147     SRunner *sr; 
    148144 
    149145    /* Add new tests here: *************** */ 
    150146    mctest_add_parameterized_test (tc_core, test_regex_process_escape_sequence, 
    151147                                   test_regex_process_escape_sequence_ds); 
    152148    /* *********************************** */ 
    153149 
    154     suite_add_tcase (s, tc_core); 
    155     sr = srunner_create (s); 
    156     srunner_set_log (sr, "regex_process_escape_sequence.log"); 
    157     srunner_run_all (sr, CK_ENV); 
    158     number_failed = srunner_ntests_failed (sr); 
    159     srunner_free (sr); 
    160     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     150    return mctest_run_all(tc_core); 
    161151} 
    162152 
    163153/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/search/regex_replace_esc_seq.c

    diff --git a/tests/lib/search/regex_replace_esc_seq.c b/tests/lib/search/regex_replace_esc_seq.c
    index 2a6090dbc..7ab3ee901 100644
    a b END_PARAMETRIZED_TEST 
    210210int 
    211211main (void) 
    212212{ 
    213     int number_failed; 
    214  
    215     Suite *s = suite_create (TEST_SUITE_NAME); 
    216213    TCase *tc_core = tcase_create ("Core"); 
    217     SRunner *sr; 
    218214 
    219215    /* Add new tests here: *************** */ 
    220216    mctest_add_parameterized_test (tc_core, test_regex_replace_esc_seq_prepare, 
    221217                                   test_regex_replace_esc_seq_prepare_ds); 
    222218    /* *********************************** */ 
    223219 
    224     suite_add_tcase (s, tc_core); 
    225     sr = srunner_create (s); 
    226     srunner_set_log (sr, "regex_replace_esc_seq.log"); 
    227     srunner_run_all (sr, CK_ENV); 
    228     number_failed = srunner_ntests_failed (sr); 
    229     srunner_free (sr); 
    230     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     220    return mctest_run_all(tc_core); 
    231221} 
    232222 
    233223/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/search/translate_replace_glob_to_regex.c

    diff --git a/tests/lib/search/translate_replace_glob_to_regex.c b/tests/lib/search/translate_replace_glob_to_regex.c
    index 71f841718..7f9594373 100644
    a b END_PARAMETRIZED_TEST 
    8383int 
    8484main (void) 
    8585{ 
    86     int number_failed; 
    87  
    88     Suite *s = suite_create (TEST_SUITE_NAME); 
    8986    TCase *tc_core = tcase_create ("Core"); 
    90     SRunner *sr; 
    9187 
    9288    /* Add new tests here: *************** */ 
    9389    mctest_add_parameterized_test (tc_core, test_translate_replace_glob_to_regex, 
    9490                                   test_translate_replace_glob_to_regex_ds); 
    9591    /* *********************************** */ 
    9692 
    97     suite_add_tcase (s, tc_core); 
    98     sr = srunner_create (s); 
    99     srunner_set_log (sr, "translate_replace_glob_to_regex.log"); 
    100     srunner_run_all (sr, CK_ENV); 
    101     number_failed = srunner_ntests_failed (sr); 
    102     srunner_free (sr); 
    103     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     93    return mctest_run_all(tc_core); 
    10494} 
    10595 
    10696/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/serialize.c

    diff --git a/tests/lib/serialize.c b/tests/lib/serialize.c
    index 6c1ffe432..cfeb9057e 100644
    a b END_TEST 
    359359int 
    360360main (void) 
    361361{ 
    362     int number_failed; 
    363  
    364     Suite *s = suite_create (TEST_SUITE_NAME); 
    365362    TCase *tc_core = tcase_create ("Core"); 
    366     SRunner *sr; 
    367363 
    368364    tcase_add_checked_fixture (tc_core, setup, teardown); 
    369365 
    main (void) 
    383379    tcase_add_test (tc_core, test_deserialize_config); 
    384380    /* *********************************** */ 
    385381 
    386     suite_add_tcase (s, tc_core); 
    387     sr = srunner_create (s); 
    388     srunner_set_log (sr, "serialize.log"); 
    389     srunner_run_all (sr, CK_ENV); 
    390     number_failed = srunner_ntests_failed (sr); 
    391     srunner_free (sr); 
    392     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     382    return mctest_run_all(tc_core); 
    393383} 
    394384 
    395385/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/strutil/filevercmp.c

    diff --git a/tests/lib/strutil/filevercmp.c b/tests/lib/strutil/filevercmp.c
    index 867858e62..9fbd4aab4 100644
    a b END_TEST 
    269269int 
    270270main (void) 
    271271{ 
    272     int number_failed; 
    273  
    274     Suite *s = suite_create (TEST_SUITE_NAME); 
    275272    TCase *tc_core = tcase_create ("Core"); 
    276     SRunner *sr; 
    277273 
    278274    tcase_add_checked_fixture (tc_core, setup, teardown); 
    279275 
    main (void) 
    284280    tcase_add_loop_test (tc_core, filevercmp_test4, 0, filevercmp_test_ds4_len); 
    285281    /* *********************************** */ 
    286282 
    287     suite_add_tcase (s, tc_core); 
    288     sr = srunner_create (s); 
    289     srunner_set_log (sr, "filevercmp.log"); 
    290     srunner_run_all (sr, CK_ENV); 
    291     number_failed = srunner_ntests_failed (sr); 
    292     srunner_free (sr); 
    293     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     283    return mctest_run_all(tc_core); 
    294284} 
    295285 
    296286/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/strutil/parse_integer.c

    diff --git a/tests/lib/strutil/parse_integer.c b/tests/lib/strutil/parse_integer.c
    index f3e5ba357..6aef333b3 100644
    a b END_PARAMETRIZED_TEST 
    143143int 
    144144main (void) 
    145145{ 
    146     int number_failed; 
    147  
    148     Suite *s = suite_create (TEST_SUITE_NAME); 
    149146    TCase *tc_core = tcase_create ("Core"); 
    150     SRunner *sr; 
    151147 
    152148    tcase_add_checked_fixture (tc_core, setup, teardown); 
    153149 
    main (void) 
    155151    mctest_add_parameterized_test (tc_core, parse_integer_test, parse_integer_test_ds); 
    156152    /* *********************************** */ 
    157153 
    158     suite_add_tcase (s, tc_core); 
    159     sr = srunner_create (s); 
    160     srunner_set_log (sr, "parse_integer.log"); 
    161     srunner_run_all (sr, CK_ENV); 
    162     number_failed = srunner_ntests_failed (sr); 
    163     srunner_free (sr); 
    164     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     154    return mctest_run_all(tc_core); 
    165155} 
    166156 
    167157/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/strutil/replace__str_replace_all.c

    diff --git a/tests/lib/strutil/replace__str_replace_all.c b/tests/lib/strutil/replace__str_replace_all.c
    index 67c8b40dc..7821ab955 100644
    a b END_PARAMETRIZED_TEST 
    170170int 
    171171main (void) 
    172172{ 
    173     int number_failed; 
    174  
    175     Suite *s = suite_create (TEST_SUITE_NAME); 
    176173    TCase *tc_core = tcase_create ("Core"); 
    177     SRunner *sr; 
    178174 
    179175    tcase_add_checked_fixture (tc_core, setup, teardown); 
    180176 
    main (void) 
    182178    mctest_add_parameterized_test (tc_core, str_replace_all_test, str_replace_all_test_ds); 
    183179    /* *********************************** */ 
    184180 
    185     suite_add_tcase (s, tc_core); 
    186     sr = srunner_create (s); 
    187     srunner_set_log (sr, "replace__str_replace_all.log"); 
    188     srunner_run_all (sr, CK_ENV); 
    189     number_failed = srunner_ntests_failed (sr); 
    190     srunner_free (sr); 
    191     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     181    return mctest_run_all(tc_core); 
    192182} 
    193183 
    194184/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/strutil/str_verscmp.c

    diff --git a/tests/lib/strutil/str_verscmp.c b/tests/lib/strutil/str_verscmp.c
    index 2a1e545aa..ad98748c3 100644
    a b END_TEST 
    119119int 
    120120main (void) 
    121121{ 
    122     int number_failed; 
    123  
    124     Suite *s = suite_create (TEST_SUITE_NAME); 
    125122    TCase *tc_core = tcase_create ("Core"); 
    126     SRunner *sr; 
    127123 
    128124    tcase_add_checked_fixture (tc_core, setup, teardown); 
    129125 
    main (void) 
    131127    mctest_add_parameterized_test (tc_core, str_verscmp_test, str_verscmp_test_ds); 
    132128    /* *********************************** */ 
    133129 
    134     suite_add_tcase (s, tc_core); 
    135     sr = srunner_create (s); 
    136     srunner_set_log (sr, "str_verscmp.log"); 
    137     srunner_run_all (sr, CK_ENV); 
    138     number_failed = srunner_ntests_failed (sr); 
    139     srunner_free (sr); 
    140     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     130    return mctest_run_all(tc_core); 
    141131} 
    142132 
    143133/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/utilunix__my_system-fork_child.c

    diff --git a/tests/lib/utilunix__my_system-fork_child.c b/tests/lib/utilunix__my_system-fork_child.c
    index 95081db11..15409fcdd 100644
    a b END_TEST 
    6969int 
    7070main (void) 
    7171{ 
    72     int number_failed; 
    73  
    74     Suite *s = suite_create (TEST_SUITE_NAME); 
    7572    TCase *tc_core = tcase_create ("Core"); 
    76     SRunner *sr; 
    7773 
    7874    tcase_add_checked_fixture (tc_core, setup, teardown); 
    7975 
    main (void) 
    8177    tcase_add_test (tc_core, fork_child); 
    8278    /* *********************************** */ 
    8379 
    84     suite_add_tcase (s, tc_core); 
    85     sr = srunner_create (s); 
    86     srunner_set_log (sr, "utilinux__my_system-fork_child.log"); 
    87     srunner_run_all (sr, CK_ENV); 
    88     number_failed = srunner_ntests_failed (sr); 
    89     srunner_free (sr); 
    90     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     80    return mctest_run_all(tc_core); 
    9181} 
    9282 
    9383/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/utilunix__my_system-fork_child_shell.c

    diff --git a/tests/lib/utilunix__my_system-fork_child_shell.c b/tests/lib/utilunix__my_system-fork_child_shell.c
    index 6de19581b..177f9b44b 100644
    a b END_TEST 
    7070int 
    7171main (void) 
    7272{ 
    73     int number_failed; 
    74  
    75     Suite *s = suite_create (TEST_SUITE_NAME); 
    7673    TCase *tc_core = tcase_create ("Core"); 
    77     SRunner *sr; 
    7874 
    7975    tcase_add_checked_fixture (tc_core, setup, teardown); 
    8076 
    main (void) 
    8278    tcase_add_test (tc_core, fork_child_as_shell); 
    8379    /* *********************************** */ 
    8480 
    85     suite_add_tcase (s, tc_core); 
    86     sr = srunner_create (s); 
    87     srunner_set_log (sr, "utilinux__my_system-fork_child_shell.log"); 
    88     srunner_run_all (sr, CK_ENV); 
    89     number_failed = srunner_ntests_failed (sr); 
    90     srunner_free (sr); 
    91     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     81    return mctest_run_all(tc_core); 
    9282} 
    9383 
    9484/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/utilunix__my_system-fork_fail.c

    diff --git a/tests/lib/utilunix__my_system-fork_fail.c b/tests/lib/utilunix__my_system-fork_fail.c
    index 452efb161..dc605d484 100644
    a b END_TEST 
    6565int 
    6666main (void) 
    6767{ 
    68     int number_failed; 
    69  
    70     Suite *s = suite_create (TEST_SUITE_NAME); 
    7168    TCase *tc_core = tcase_create ("Core"); 
    72     SRunner *sr; 
    7369 
    7470    tcase_add_checked_fixture (tc_core, setup, teardown); 
    7571 
    main (void) 
    7773    tcase_add_test (tc_core, fork_fail); 
    7874    /* *********************************** */ 
    7975 
    80     suite_add_tcase (s, tc_core); 
    81     sr = srunner_create (s); 
    82     srunner_set_log (sr, "utilinux__my_system-fork_fail.log"); 
    83     srunner_run_all (sr, CK_ENV); 
    84     number_failed = srunner_ntests_failed (sr); 
    85     srunner_free (sr); 
    86     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     76    return mctest_run_all(tc_core); 
    8777} 
    8878 
    8979/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/canonicalize_pathname.c

    diff --git a/tests/lib/vfs/canonicalize_pathname.c b/tests/lib/vfs/canonicalize_pathname.c
    index 6364a404b..96af3a55a 100644
    a b END_PARAMETRIZED_TEST 
    187187int 
    188188main (void) 
    189189{ 
    190     int number_failed; 
    191  
    192     Suite *s = suite_create (TEST_SUITE_NAME); 
    193190    TCase *tc_core = tcase_create ("Core"); 
    194     SRunner *sr; 
    195191 
    196192    tcase_add_checked_fixture (tc_core, setup, teardown); 
    197193 
    main (void) 
    199195    mctest_add_parameterized_test (tc_core, test_canonicalize_path, test_canonicalize_path_ds); 
    200196    /* *********************************** */ 
    201197 
    202     suite_add_tcase (s, tc_core); 
    203     sr = srunner_create (s); 
    204     srunner_set_log (sr, "canonicalize_pathname.log"); 
    205     srunner_run_all (sr, CK_ENV); 
    206     number_failed = srunner_ntests_failed (sr); 
    207     srunner_free (sr); 
    208     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     198    return mctest_run_all(tc_core); 
    209199} 
    210200 
    211201/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/current_dir.c

    diff --git a/tests/lib/vfs/current_dir.c b/tests/lib/vfs/current_dir.c
    index 398fc5440..3c211d9ea 100644
    a b END_PARAMETRIZED_TEST 
    185185int 
    186186main (void) 
    187187{ 
    188     int number_failed; 
    189188    char *cwd; 
    190  
    191     Suite *s = suite_create (TEST_SUITE_NAME); 
    192189    TCase *tc_core = tcase_create ("Core"); 
    193     SRunner *sr; 
    194190 
    195191    /* writable directory where check creates temporary files */ 
    196192    cwd = g_get_current_dir (); 
    main (void) 
    203199    mctest_add_parameterized_test (tc_core, test_cd, test_cd_ds); 
    204200    /* *********************************** */ 
    205201 
    206     suite_add_tcase (s, tc_core); 
    207     sr = srunner_create (s); 
    208     srunner_set_log (sr, "current_dir.log"); 
    209     srunner_run_all (sr, CK_ENV); 
    210     number_failed = srunner_ntests_failed (sr); 
    211     srunner_free (sr); 
    212     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     202    return mctest_run_all(tc_core); 
    213203} 
    214204 
    215205/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/path_cmp.c

    diff --git a/tests/lib/vfs/path_cmp.c b/tests/lib/vfs/path_cmp.c
    index 0e19566c7..166c91c09 100644
    a b END_PARAMETRIZED_TEST 
    237237int 
    238238main (void) 
    239239{ 
    240     int number_failed; 
    241  
    242     Suite *s = suite_create (TEST_SUITE_NAME); 
    243240    TCase *tc_core = tcase_create ("Core"); 
    244     SRunner *sr; 
    245241 
    246242    tcase_add_checked_fixture (tc_core, setup, teardown); 
    247243 
    main (void) 
    250246    mctest_add_parameterized_test (tc_core, test_path_equal_len, test_path_equal_len_ds); 
    251247    /* *********************************** */ 
    252248 
    253     suite_add_tcase (s, tc_core); 
    254     sr = srunner_create (s); 
    255     srunner_set_log (sr, "path_cmp.log"); 
    256     srunner_run_all (sr, CK_ENV); 
    257     number_failed = srunner_ntests_failed (sr); 
    258     srunner_free (sr); 
    259     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     249    return mctest_run_all(tc_core); 
    260250} 
    261251 
    262252/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/path_len.c

    diff --git a/tests/lib/vfs/path_len.c b/tests/lib/vfs/path_len.c
    index e68176dbc..e6812d8c6 100644
    a b END_PARAMETRIZED_TEST 
    126126int 
    127127main (void) 
    128128{ 
    129     int number_failed; 
    130  
    131     Suite *s = suite_create (TEST_SUITE_NAME); 
    132129    TCase *tc_core = tcase_create ("Core"); 
    133     SRunner *sr; 
    134130 
    135131    tcase_add_checked_fixture (tc_core, setup, teardown); 
    136132 
    main (void) 
    138134    mctest_add_parameterized_test (tc_core, test_path_length, test_path_length_ds); 
    139135    /* *********************************** */ 
    140136 
    141     suite_add_tcase (s, tc_core); 
    142     sr = srunner_create (s); 
    143     srunner_set_log (sr, "path_len.log"); 
    144     srunner_run_all (sr, CK_ENV); 
    145     number_failed = srunner_ntests_failed (sr); 
    146     srunner_free (sr); 
    147     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     137    return mctest_run_all(tc_core); 
    148138} 
    149139 
    150140/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/path_manipulations.c

    diff --git a/tests/lib/vfs/path_manipulations.c b/tests/lib/vfs/path_manipulations.c
    index 45f31e1f2..c5d87d6e5 100644
    a b END_PARAMETRIZED_TEST 
    435435int 
    436436main (void) 
    437437{ 
    438     int number_failed; 
    439  
    440     Suite *s = suite_create (TEST_SUITE_NAME); 
    441438    TCase *tc_core = tcase_create ("Core"); 
    442     SRunner *sr; 
    443439 
    444440    tcase_add_checked_fixture (tc_core, setup, teardown); 
    445441 
    main (void) 
    454450                                   test_vfs_path_relative_ds); 
    455451    /* *********************************** */ 
    456452 
    457     suite_add_tcase (s, tc_core); 
    458     sr = srunner_create (s); 
    459     srunner_set_log (sr, "path_manipulations.log"); 
    460     srunner_run_all (sr, CK_ENV); 
    461     number_failed = srunner_ntests_failed (sr); 
    462     srunner_free (sr); 
    463     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     453    return mctest_run_all(tc_core); 
    464454} 
    465455 
    466456/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/path_recode.c

    diff --git a/tests/lib/vfs/path_recode.c b/tests/lib/vfs/path_recode.c
    index f53094a3b..b8220b065 100644
    a b END_PARAMETRIZED_TEST 
    268268int 
    269269main (void) 
    270270{ 
    271     int number_failed; 
    272  
    273     Suite *s = suite_create (TEST_SUITE_NAME); 
    274271    TCase *tc_core = tcase_create ("Core"); 
    275     SRunner *sr; 
    276272 
    277273    tcase_add_checked_fixture (tc_core, setup, teardown); 
    278274 
    main (void) 
    281277    mctest_add_parameterized_test (tc_core, test_path_to_str_flags, test_path_to_str_flags_ds); 
    282278    /* *********************************** */ 
    283279 
    284     suite_add_tcase (s, tc_core); 
    285     sr = srunner_create (s); 
    286     srunner_set_log (sr, "path_recode.log"); 
    287     srunner_run_all (sr, CK_ENV); 
    288     number_failed = srunner_ntests_failed (sr); 
    289     srunner_free (sr); 
    290     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     280    return mctest_run_all(tc_core); 
    291281} 
    292282 
    293283/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/path_serialize.c

    diff --git a/tests/lib/vfs/path_serialize.c b/tests/lib/vfs/path_serialize.c
    index 8ae2c830b..99da7cafa 100644
    a b END_TEST 
    186186int 
    187187main (void) 
    188188{ 
    189     int number_failed; 
    190  
    191     Suite *s = suite_create (TEST_SUITE_NAME); 
    192189    TCase *tc_core = tcase_create ("Core"); 
    193     SRunner *sr; 
    194190 
    195191    tcase_add_checked_fixture (tc_core, setup, teardown); 
    196192 
    main (void) 
    199195    tcase_add_test (tc_core, test_path_deserialize); 
    200196    /* *********************************** */ 
    201197 
    202     suite_add_tcase (s, tc_core); 
    203     sr = srunner_create (s); 
    204     srunner_set_log (sr, "path_serialize.log"); 
    205     srunner_run_all (sr, CK_ENV); 
    206     number_failed = srunner_ntests_failed (sr); 
    207     srunner_free (sr); 
    208     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     198    return mctest_run_all(tc_core); 
    209199} 
    210200 
    211201/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/relative_cd.c

    diff --git a/tests/lib/vfs/relative_cd.c b/tests/lib/vfs/relative_cd.c
    index bf5d62319..de79f3301 100644
    a b END_TEST 
    198198int 
    199199main (void) 
    200200{ 
    201     int number_failed; 
    202201    char *cwd; 
    203  
    204     Suite *s = suite_create (TEST_SUITE_NAME); 
    205202    TCase *tc_core = tcase_create ("Core"); 
    206     SRunner *sr; 
    207203 
    208204    /* writable directory where check creates temporary files */ 
    209205    cwd = g_get_current_dir (); 
    main (void) 
    217213    tcase_add_test (tc_core, test_vpath_to_str_filter); 
    218214    /* *********************************** */ 
    219215 
    220     suite_add_tcase (s, tc_core); 
    221     sr = srunner_create (s); 
    222     srunner_set_log (sr, "relative_cd.log"); 
    223     srunner_run_all (sr, CK_ENV); 
    224     number_failed = srunner_ntests_failed (sr); 
    225     srunner_free (sr); 
    226     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     216    return mctest_run_all(tc_core); 
    227217} 
    228218 
    229219/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/tempdir.c

    diff --git a/tests/lib/vfs/tempdir.c b/tests/lib/vfs/tempdir.c
    index 8c5f3b359..850d6b1c8 100644
    a b END_TEST 
    123123int 
    124124main (void) 
    125125{ 
    126     int number_failed; 
    127  
    128     Suite *s = suite_create (TEST_SUITE_NAME); 
    129126    TCase *tc_core = tcase_create ("Core"); 
    130     SRunner *sr; 
    131127 
    132128    tcase_add_checked_fixture (tc_core, setup, teardown); 
    133129 
    main (void) 
    136132    tcase_add_test (tc_core, test_mc_mkstemps); 
    137133    /* *********************************** */ 
    138134 
    139     suite_add_tcase (s, tc_core); 
    140     sr = srunner_create (s); 
    141     srunner_set_log (sr, "tempdir.log"); 
    142     srunner_run_all (sr, CK_ENV); 
    143     number_failed = srunner_ntests_failed (sr); 
    144     srunner_free (sr); 
    145     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     135    return mctest_run_all(tc_core); 
    146136} 
    147137 
    148138/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/vfs_adjust_stat.c

    diff --git a/tests/lib/vfs/vfs_adjust_stat.c b/tests/lib/vfs/vfs_adjust_stat.c
    index e216077f9..04c5bf0cb 100644
    a b END_PARAMETRIZED_TEST 
    191191int 
    192192main (void) 
    193193{ 
    194     int number_failed; 
    195  
    196     Suite *s = suite_create (TEST_SUITE_NAME); 
    197194    TCase *tc_core = tcase_create ("Core"); 
    198     SRunner *sr; 
    199195 
    200196    /* Add new tests here: *************** */ 
    201197    mctest_add_parameterized_test (tc_core, test_vfs_adjust_stat, test_vfs_adjust_stat_ds); 
    202198    /* *********************************** */ 
    203199 
    204     suite_add_tcase (s, tc_core); 
    205     sr = srunner_create (s); 
    206     srunner_set_log (sr, "vfs_adjust_stat.log"); 
    207     srunner_run_all (sr, CK_ENV); 
    208     number_failed = srunner_ntests_failed (sr); 
    209     srunner_free (sr); 
    210     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     200    return mctest_run_all(tc_core); 
    211201} 
    212202 
    213203/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/vfs_get_encoding.c

    diff --git a/tests/lib/vfs/vfs_get_encoding.c b/tests/lib/vfs/vfs_get_encoding.c
    index 783ec6e00..825f2bb1e 100644
    a b END_PARAMETRIZED_TEST 
    143143int 
    144144main (void) 
    145145{ 
    146     int number_failed; 
    147  
    148     Suite *s = suite_create (TEST_SUITE_NAME); 
    149146    TCase *tc_core = tcase_create ("Core"); 
    150     SRunner *sr; 
    151147 
    152148    tcase_add_checked_fixture (tc_core, setup, teardown); 
    153149 
    main (void) 
    155151    mctest_add_parameterized_test (tc_core, test_vfs_get_encoding, test_vfs_get_encoding_ds); 
    156152    /* *********************************** */ 
    157153 
    158     suite_add_tcase (s, tc_core); 
    159     sr = srunner_create (s); 
    160     srunner_set_log (sr, "vfs_get_encoding.log"); 
    161     srunner_run_all (sr, CK_ENV); 
    162     number_failed = srunner_ntests_failed (sr); 
    163     srunner_free (sr); 
    164     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     154    return mctest_run_all(tc_core); 
    165155} 
    166156 
    167157/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/vfs_parse_ls_lga.c

    diff --git a/tests/lib/vfs/vfs_parse_ls_lga.c b/tests/lib/vfs/vfs_parse_ls_lga.c
    index b1b203af5..01b081c04 100644
    a b END_TEST 
    408408int 
    409409main (void) 
    410410{ 
    411     int number_failed; 
    412  
    413     Suite *s = suite_create (TEST_SUITE_NAME); 
    414411    TCase *tc_core = tcase_create ("Core"); 
    415     SRunner *sr; 
    416412 
    417413    tcase_add_checked_fixture (tc_core, setup, teardown); 
    418414 
    main (void) 
    422418    tcase_add_test (tc_core, test_vfs_parse_ls_lga_unaligned); 
    423419    /* *********************************** */ 
    424420 
    425     suite_add_tcase (s, tc_core); 
    426     sr = srunner_create (s); 
    427     srunner_set_log (sr, "vfs_parse_ls_lga.log"); 
    428     srunner_run_all (sr, CK_ENV); 
    429     number_failed = srunner_ntests_failed (sr); 
    430     srunner_free (sr); 
    431     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     421    return mctest_run_all(tc_core); 
    432422} 
    433423 
    434424/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/vfs_path_from_str_flags.c

    diff --git a/tests/lib/vfs/vfs_path_from_str_flags.c b/tests/lib/vfs/vfs_path_from_str_flags.c
    index 5700c7f03..1be693242 100644
    a b END_PARAMETRIZED_TEST 
    109109int 
    110110main (void) 
    111111{ 
    112     int number_failed; 
    113  
    114     Suite *s = suite_create (TEST_SUITE_NAME); 
    115112    TCase *tc_core = tcase_create ("Core"); 
    116     SRunner *sr; 
    117113 
    118114    tcase_add_checked_fixture (tc_core, setup, teardown); 
    119115 
    main (void) 
    121117    mctest_add_parameterized_test (tc_core, test_strip_home, test_strip_home_ds); 
    122118    /* *********************************** */ 
    123119 
    124     suite_add_tcase (s, tc_core); 
    125     sr = srunner_create (s); 
    126     srunner_set_log (sr, "vfs_path_from_str_flags.log"); 
    127     srunner_run_all (sr, CK_ENV); 
    128     number_failed = srunner_ntests_failed (sr); 
    129     srunner_free (sr); 
    130     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     120    return mctest_run_all(tc_core); 
    131121} 
    132122 
    133123/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/vfs_path_string_convert.c

    diff --git a/tests/lib/vfs/vfs_path_string_convert.c b/tests/lib/vfs/vfs_path_string_convert.c
    index 3c32471a5..515800442 100644
    a b END_TEST 
    314314int 
    315315main (void) 
    316316{ 
    317     int number_failed; 
    318  
    319     Suite *s = suite_create (TEST_SUITE_NAME); 
    320317    TCase *tc_core = tcase_create ("Core"); 
    321     SRunner *sr; 
    322318 
    323319    tcase_add_checked_fixture (tc_core, setup, teardown); 
    324320 
    main (void) 
    331327#endif 
    332328    /* *********************************** */ 
    333329 
    334     suite_add_tcase (s, tc_core); 
    335     sr = srunner_create (s); 
    336     srunner_set_log (sr, "vfs_path_string_convert.log"); 
    337     srunner_run_all (sr, CK_ENV); 
    338     number_failed = srunner_ntests_failed (sr); 
    339     srunner_free (sr); 
    340     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     330    return mctest_run_all(tc_core); 
    341331} 
    342332 
    343333/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/vfs_prefix_to_class.c

    diff --git a/tests/lib/vfs/vfs_prefix_to_class.c b/tests/lib/vfs/vfs_prefix_to_class.c
    index 5c7d79723..7695d7c0a 100644
    a b END_PARAMETRIZED_TEST 
    154154int 
    155155main (void) 
    156156{ 
    157     int number_failed; 
    158  
    159     Suite *s = suite_create (TEST_SUITE_NAME); 
    160157    TCase *tc_core = tcase_create ("Core"); 
    161     SRunner *sr; 
    162158 
    163159    tcase_add_checked_fixture (tc_core, setup, teardown); 
    164160 
    main (void) 
    166162    mctest_add_parameterized_test (tc_core, test_vfs_prefix_to_class, test_vfs_prefix_to_class_ds); 
    167163    /* *********************************** */ 
    168164 
    169     suite_add_tcase (s, tc_core); 
    170     sr = srunner_create (s); 
    171     srunner_set_log (sr, "vfs_prefix_to_class.log"); 
    172     srunner_run_all (sr, CK_ENV); 
    173     number_failed = srunner_ntests_failed (sr); 
    174     srunner_free (sr); 
    175     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     165    return mctest_run_all(tc_core); 
    176166} 
    177167 
    178168/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/vfs_s_get_path.c

    diff --git a/tests/lib/vfs/vfs_s_get_path.c b/tests/lib/vfs/vfs_s_get_path.c
    index 0aa0037b2..e349bf994 100644
    a b END_TEST 
    152152int 
    153153main (void) 
    154154{ 
    155     int number_failed; 
    156  
    157     Suite *s = suite_create (TEST_SUITE_NAME); 
    158155    TCase *tc_core = tcase_create ("Core"); 
    159     SRunner *sr; 
    160156 
    161157    tcase_add_checked_fixture (tc_core, setup, teardown); 
    162158 
    main (void) 
    164160    tcase_add_test (tc_core, test_vfs_s_get_path); 
    165161    /* *********************************** */ 
    166162 
    167     suite_add_tcase (s, tc_core); 
    168     sr = srunner_create (s); 
    169     srunner_set_log (sr, "vfs_s_get_path.log"); 
    170     srunner_run_all (sr, CK_ENV); 
    171     number_failed = srunner_ntests_failed (sr); 
    172     srunner_free (sr); 
    173     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     163    return mctest_run_all(tc_core); 
    174164} 
    175165 
    176166/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/vfs_setup_cwd.c

    diff --git a/tests/lib/vfs/vfs_setup_cwd.c b/tests/lib/vfs/vfs_setup_cwd.c
    index 3d408f028..3be3e77a4 100644
    a b END_PARAMETRIZED_TEST 
    140140int 
    141141main (void) 
    142142{ 
    143     int number_failed; 
    144  
    145     Suite *s = suite_create (TEST_SUITE_NAME); 
    146143    TCase *tc_core = tcase_create ("Core"); 
    147     SRunner *sr; 
    148144 
    149145    tcase_add_checked_fixture (tc_core, setup, teardown); 
    150146 
    main (void) 
    153149                                   test_vfs_setup_cwd_symlink_ds); 
    154150    /* *********************************** */ 
    155151 
    156     suite_add_tcase (s, tc_core); 
    157     sr = srunner_create (s); 
    158     srunner_set_log (sr, "vfs_setup_cwd.log"); 
    159     srunner_run_all (sr, CK_ENV); 
    160     number_failed = srunner_ntests_failed (sr); 
    161     srunner_free (sr); 
    162     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     152    return mctest_run_all(tc_core); 
    163153} 
    164154 
    165155/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/vfs/vfs_split.c

    diff --git a/tests/lib/vfs/vfs_split.c b/tests/lib/vfs/vfs_split.c
    index 289dbebf8..94889778b 100644
    a b END_PARAMETRIZED_TEST 
    191191int 
    192192main (void) 
    193193{ 
    194     int number_failed; 
    195  
    196     Suite *s = suite_create (TEST_SUITE_NAME); 
    197194    TCase *tc_core = tcase_create ("Core"); 
    198     SRunner *sr; 
    199195 
    200196    tcase_add_checked_fixture (tc_core, setup, teardown); 
    201197 
    main (void) 
    203199    mctest_add_parameterized_test (tc_core, test_vfs_split, test_vfs_split_ds); 
    204200    /* *********************************** */ 
    205201 
    206     suite_add_tcase (s, tc_core); 
    207     sr = srunner_create (s); 
    208     srunner_set_log (sr, "vfs_split.log"); 
    209     srunner_run_all (sr, CK_ENV); 
    210     number_failed = srunner_ntests_failed (sr); 
    211     srunner_free (sr); 
    212     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     202    return mctest_run_all(tc_core); 
    213203} 
    214204 
    215205/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/widget/complete_engine.c

    diff --git a/tests/lib/widget/complete_engine.c b/tests/lib/widget/complete_engine.c
    index b9923ee76..1bdd64408 100644
    a b END_PARAMETRIZED_TEST 
    221221int 
    222222main (void) 
    223223{ 
    224     int number_failed; 
    225  
    226     Suite *s = suite_create (TEST_SUITE_NAME); 
    227224    TCase *tc_core = tcase_create ("Core"); 
    228     SRunner *sr; 
    229225 
    230226    tcase_add_checked_fixture (tc_core, setup, teardown); 
    231227 
    main (void) 
    234230                                   test_complete_engine_fill_completions_ds); 
    235231    /* *********************************** */ 
    236232 
    237     suite_add_tcase (s, tc_core); 
    238     sr = srunner_create (s); 
    239     srunner_set_log (sr, "complete_engine.log"); 
    240     srunner_run_all (sr, CK_ENV); 
    241     number_failed = srunner_ntests_failed (sr); 
    242     srunner_free (sr); 
    243     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     233    return mctest_run_all(tc_core); 
    244234} 
    245235 
    246236/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/widget/group_init_destroy.c

    diff --git a/tests/lib/widget/group_init_destroy.c b/tests/lib/widget/group_init_destroy.c
    index 56fbec41e..fe622b69d 100644
    a b  
    3131 
    3232#include "lib/widget.h" 
    3333 
     34#include "tests/mctest.h" 
     35 
    3436/* --------------------------------------------------------------------------------------------- */ 
    3537 
    3638static int ref = 0; 
    END_TEST 
    134136int 
    135137main (void) 
    136138{ 
    137     int number_failed; 
    138  
    139     Suite *s = suite_create (TEST_SUITE_NAME); 
    140139    TCase *tc_core = tcase_create ("Core"); 
    141     SRunner *sr; 
    142140 
    143141    /* Add new tests here: *************** */ 
    144142    tcase_add_test (tc_core, test_group_init_deinit); 
    145143    /* *********************************** */ 
    146144 
    147     suite_add_tcase (s, tc_core); 
    148     sr = srunner_create (s); 
    149     srunner_set_log (sr, "group_init_deinit.log"); 
    150     srunner_run_all (sr, CK_NORMAL); 
    151     number_failed = srunner_ntests_failed (sr); 
    152     srunner_free (sr); 
    153     return (number_failed == 0) ? 0 : 1; 
     145    return mctest_run_all(tc_core); 
    154146} 
    155147 
    156148/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/widget/hotkey_equal.c

    diff --git a/tests/lib/widget/hotkey_equal.c b/tests/lib/widget/hotkey_equal.c
    index d9a9e0cc3..725324a3c 100644
    a b END_PARAMETRIZED_TEST 
    151151int 
    152152main (void) 
    153153{ 
    154     int number_failed; 
    155  
    156     Suite *s = suite_create (TEST_SUITE_NAME); 
    157154    TCase *tc_core = tcase_create ("Core"); 
    158     SRunner *sr; 
    159155 
    160156    tcase_add_checked_fixture (tc_core, setup, teardown); 
    161157 
    main (void) 
    163159    mctest_add_parameterized_test (tc_core, test_hotkey_equal, test_hotkey_equal_ds); 
    164160    /* *********************************** */ 
    165161 
    166     suite_add_tcase (s, tc_core); 
    167     sr = srunner_create (s); 
    168     srunner_set_log (sr, "hotkey_equal.log"); 
    169     srunner_run_all (sr, CK_ENV); 
    170     number_failed = srunner_ntests_failed (sr); 
    171     srunner_free (sr); 
    172     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     162    return mctest_run_all(tc_core); 
    173163} 
    174164 
    175165/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/widget/widget_find_by_id.c

    diff --git a/tests/lib/widget/widget_find_by_id.c b/tests/lib/widget/widget_find_by_id.c
    index ddb528db9..c4390a219 100644
    a b  
    3131 
    3232#include "lib/widget.h" 
    3333 
     34#include "tests/mctest.h" 
     35 
    3436/* --------------------------------------------------------------------------------------------- */ 
    3537 
    3638/* *INDENT-OFF* */ 
    END_TEST 
    9597int 
    9698main (void) 
    9799{ 
    98     int number_failed; 
    99  
    100     Suite *s = suite_create (TEST_SUITE_NAME); 
    101100    TCase *tc_core = tcase_create ("Core"); 
    102     SRunner *sr; 
    103101 
    104102    /* Add new tests here: *************** */ 
    105103    tcase_add_test (tc_core, test_widget_find_by_id); 
    106104    /* *********************************** */ 
    107105 
    108     suite_add_tcase (s, tc_core); 
    109     sr = srunner_create (s); 
    110     srunner_set_log (sr, "widget_find_by_id.log"); 
    111     srunner_run_all (sr, CK_NORMAL); 
    112     number_failed = srunner_ntests_failed (sr); 
    113     srunner_free (sr); 
    114     return (number_failed == 0) ? 0 : 1; 
     106    return mctest_run_all(tc_core); 
    115107} 
    116108 
    117109/* --------------------------------------------------------------------------------------------- */ 
  • tests/lib/x_basename.c

    diff --git a/tests/lib/x_basename.c b/tests/lib/x_basename.c
    index c3a85f463..c7a54d04f 100644
    a b END_PARAMETRIZED_TEST 
    112112int 
    113113main (void) 
    114114{ 
    115     int number_failed; 
    116  
    117     Suite *s = suite_create (TEST_SUITE_NAME); 
    118115    TCase *tc_core = tcase_create ("Core"); 
    119     SRunner *sr; 
    120116 
    121117    tcase_add_checked_fixture (tc_core, setup, teardown); 
    122118 
    main (void) 
    124120    mctest_add_parameterized_test (tc_core, test_x_basename, test_x_basename_ds); 
    125121    /* *********************************** */ 
    126122 
    127     suite_add_tcase (s, tc_core); 
    128     sr = srunner_create (s); 
    129     srunner_set_log (sr, "x_basename.log"); 
    130     srunner_run_all (sr, CK_ENV); 
    131     number_failed = srunner_ntests_failed (sr); 
    132     srunner_free (sr); 
    133     return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     123    return mctest_run_all(tc_core); 
    134124} 
    135125 
    136126/* --------------------------------------------------------------------------------------------- */ 
  • tests/mctest.h

    diff --git a/tests/mctest.h b/tests/mctest.h
    index 2e038a2d8..270f8fc19 100644
    a b  
    8686 
    8787/*** declarations of public functions ************************************************************/ 
    8888 
     89int mctest_run_all(TCase *tc_core); 
     90 
    8991/*** inline functions ****************************************************************************/ 
    9092 
     93int 
     94mctest_run_all(TCase *tc_core) 
     95{ 
     96    Suite *s = suite_create (TEST_SUITE_NAME); 
     97    SRunner *sr; 
     98    int number_failed; 
     99 
     100    suite_add_tcase (s, tc_core); 
     101    sr = srunner_create (s); 
     102    srunner_set_log (sr, "-"); 
     103    srunner_run_all (sr, CK_ENV); 
     104    number_failed = srunner_ntests_failed (sr); 
     105    srunner_free (sr); 
     106 
     107    return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 
     108} 
     109 
    91110#endif /* MC__TEST */