tests: return the proper TAP exit code
[babeltrace.git] / tests / plugins / flt.lttng-utils.debug-info / test_bin_info.c
index bd160d852d96eb506713674e0e915c2e52a65e46..a398faeb21f5c71f9588872cc5234771cdbf2f15 100644 (file)
@@ -404,6 +404,8 @@ int main(int argc, char **argv)
        GOptionContext *context;
        int status;
 
+       plan_tests(NR_TESTS);
+
        context = g_option_context_new("- bin info test");
        g_option_context_add_main_entries(context, entries, NULL);
        if (!g_option_context_parse(context, &argc, &argv, &error)) {
@@ -425,8 +427,6 @@ int main(int argc, char **argv)
                goto end;
        }
 
-       plan_tests(NR_TESTS);
-
        ret = bin_info_init(BT_LOG_OUTPUT_LEVEL, NULL);
        ok(ret == 0, "bin_info_init successful");
 
@@ -435,7 +435,7 @@ int main(int argc, char **argv)
        test_bin_info_build_id(opt_debug_info_dir);
        test_bin_info_debug_link(opt_debug_info_dir);
 
-       status = EXIT_SUCCESS;
+       status = exit_status();
 
 end:
        g_option_context_free(context);
This page took 0.024523 seconds and 4 git commands to generate.