fix unit tests when exit is called at the end
MODIFY
test/unittests/unit_list.c
test/unittests/unit_list.c
@@ -126,6 +126,6 @@ int main(int argc, char **argv) {
};
//return cmocka_run_group_tests (tests, setup, teardown);
- return cmocka_run_group_tests (tests, NULL, NULL);
+ __real_exit( cmocka_run_group_tests (tests, NULL, NULL) );
}

MODIFY
test/unittests/unit_maybe_alloc.c
test/unittests/unit_maybe_alloc.c
@@ -156,6 +156,6 @@ int main(int argc, char **argv) {
};
//return cmocka_run_group_tests (tests, setup, teardown);
- return cmocka_run_group_tests (tests, NULL, NULL);
+ __real_exit( cmocka_run_group_tests (tests, NULL, NULL) );
}

MODIFY
test/unittests/unit_preallocable.c
test/unittests/unit_preallocable.c
@@ -109,6 +109,6 @@ int main(int argc, char **argv) {
};
//return cmocka_run_group_tests (tests, setup, teardown);
- return cmocka_run_group_tests (tests, NULL, NULL);
+ __real_exit( cmocka_run_group_tests (tests, NULL, NULL) );
}

fix unit tests when exit is called at the end