diff options
author | Russell Belfer <rb@github.com> | 2014-05-15 10:56:28 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-05-15 10:56:28 -0700 |
commit | 8487e23797cef0284b592b5ef93eaacbac7196dc (patch) | |
tree | da883f84114eceaf6e69f7b87e16e7aac45bbdad /tests/main.c | |
parent | 4af0ef9690e9fdfc81afbeed7039d02a5f191001 (diff) | |
download | libgit2-rb/restore-search-paths.tar.gz |
Better search path sandboxingrb/restore-search-paths
There are a number of tests that modify the global or system
search paths during the tests. This adds a helper function to
make it easier to restore those paths and makes sure that they
are getting restored in a manner that preserves test isolation.
Diffstat (limited to 'tests/main.c')
-rw-r--r-- | tests/main.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/main.c b/tests/main.c index ffbbcbf48..3de4f9801 100644 --- a/tests/main.c +++ b/tests/main.c @@ -6,16 +6,12 @@ int __cdecl main(int argc, char *argv[]) int main(int argc, char *argv[]) #endif { - const char *sandbox_path; int res; clar_test_init(argc, argv); git_threads_init(); - - 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); + cl_sandbox_set_search_path_defaults(); /* Run the test suite */ res = clar_test_run(); |