diff options
| author | Vicent Martà <tanoku@gmail.com> | 2011-10-14 16:32:00 -0700 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2011-10-14 16:32:00 -0700 |
| commit | a014a083d9010e7f1ad0a00e6b48b75d6616edde (patch) | |
| tree | 6a98bf6ba1cf9ade04537773ae0a9aa564e3c6c3 /tests/test_helpers.c | |
| parent | 1776f5ab495a5748e28685da1f6da1c298cb0273 (diff) | |
| parent | 252840a59f09a62bd358c90593724af36a703161 (diff) | |
| download | libgit2-a014a083d9010e7f1ad0a00e6b48b75d6616edde.tar.gz | |
Merge pull request #459 from brodie/test-improvements
tests: propagate errors from open_temp_repo() instead of exiting
Diffstat (limited to 'tests/test_helpers.c')
| -rw-r--r-- | tests/test_helpers.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_helpers.c b/tests/test_helpers.c index 0900430e1..cb95607e1 100644 --- a/tests/test_helpers.c +++ b/tests/test_helpers.c @@ -217,10 +217,9 @@ int copydir_recurs(const char *source_directory_path, const char *destination_di int open_temp_repo(git_repository **repo, const char *path) { - if (copydir_recurs(path, TEMP_REPO_FOLDER) < GIT_SUCCESS) { - printf("\nFailed to create temporary folder. Aborting test suite.\n"); - exit(-1); - } + int error; + if ((error = copydir_recurs(path, TEMP_REPO_FOLDER)) < GIT_SUCCESS) + return error; return git_repository_open(repo, TEMP_REPO_FOLDER); } |
