main.c 554 Bytes
Newer Older
1 2
#include "clar_libgit2.h"

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

12 13
	clar_test_init(argc, argv);

14 15
	git_threads_init();

16 17 18 19
	sandbox_path = clar_sandbox_path();
	git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL, sandbox_path);
	git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, GIT_CONFIG_LEVEL_XDG, sandbox_path);

20
	/* Run the test suite */
21 22 23
	res = clar_test_run();

	clar_test_shutdown();
24 25 26 27 28 29

	giterr_clear();
	git_threads_shutdown();

	return res;
}