main.c 523 Bytes
Newer Older
1
#include "clar_libgit2.h"
2
#include "clar_libgit2_trace.h"
3

4
#ifdef _WIN32
Vicent Marti committed
5
int __cdecl main(int argc, char *argv[])
6
#else
Vicent Marti committed
7
int main(int argc, char *argv[])
8
#endif
9 10 11
{
	int res;

12 13
	clar_test_init(argc, argv);

14 15 16 17 18 19
	res = git_libgit2_init();
	if (res < 0) {
		fprintf(stderr, "failed to init libgit2");
		return res;
	}

20
	cl_global_trace_register();
21
	cl_sandbox_set_search_path_defaults();
22

23
	/* Run the test suite */
24 25 26
	res = clar_test_run();

	clar_test_shutdown();
27

28
	cl_global_trace_disable();
29
	git_libgit2_shutdown();
30 31 32

	return res;
}