Commit 2cd6d686 by Vicent Marti

Tests now run with the resources folder as a hardcoded path

Each tests expects a "TEST_RESOURCES" define with the full path to the
resources folder.

Signed-off-by: Vicent Marti <tanoku@gmail.com>
parent 6c14d641
...@@ -5,9 +5,6 @@ ...@@ -5,9 +5,6 @@
#include <git2/odb.h> #include <git2/odb.h>
#include <git2/index.h> #include <git2/index.h>
#define TEST_INDEX_PATH "../resources/testrepo.git/index"
#define TEST_INDEX2_PATH "../resources/gitgit.index"
#define TEST_INDEX_ENTRY_COUNT 109 #define TEST_INDEX_ENTRY_COUNT 109
#define TEST_INDEX2_ENTRY_COUNT 1437 #define TEST_INDEX2_ENTRY_COUNT 1437
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
#include <git2/odb.h> #include <git2/odb.h>
#include <git2/index.h> #include <git2/index.h>
#define TEST_INDEX_PATH "../resources/testrepo.git/index"
int filecmp(const char *filename1, const char *filename2) int filecmp(const char *filename1, const char *filename2)
{ {
git_file file1, file2; git_file file1, file2;
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
#include <git2/odb.h> #include <git2/odb.h>
#include <git2/index.h> #include <git2/index.h>
#define TEST_INDEX_PATH "../t0600-objects/index"
/* /*
void print_entries(git_index *index) void print_entries(git_index *index)
{ {
......
...@@ -29,8 +29,10 @@ ...@@ -29,8 +29,10 @@
#include "test_lib.h" #include "test_lib.h"
#include <git2.h> #include <git2.h>
#define ODB_FOLDER "../resources/testrepo.git/objects/" #define ODB_FOLDER (TEST_RESOURCES "/testrepo.git/objects/")
#define REPOSITORY_FOLDER "../resources/testrepo.git/" #define REPOSITORY_FOLDER (TEST_RESOURCES "/testrepo.git/")
#define TEST_INDEX_PATH (TEST_RESOURCES "/testrepo.git/index")
#define TEST_INDEX2_PATH (TEST_RESOURCES "/gitgit.index")
typedef struct object_data { typedef struct object_data {
unsigned char *bytes; /* (compressed) bytes stored in object store */ unsigned char *bytes; /* (compressed) bytes stored in object store */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment