Commit 156cfec0 by Vicent Marti

Cleanup Clar to make it SIMPLER

parent 036e81f7
/tests-clar/clar.h
/tests-clar/clar_main.c
/tests-clar/clar_main.c.rule
/tests-clar/clar.suite
/tests-clar/.clarcache
/apidocs
/trash-*.exe
/libgit2.pc
......
[submodule "tests-clar/clar"]
path = tests-clar/clar
url = https://github.com/vmg/clar.git
......@@ -233,7 +233,6 @@ INSTALL(FILES include/git2.h DESTINATION ${INCLUDE_INSTALL_DIR} )
# Tests
IF (BUILD_CLAR)
FIND_PACKAGE(PythonInterp REQUIRED)
SET(CLAR_FIXTURES "${CMAKE_CURRENT_SOURCE_DIR}/tests-clar/resources/")
......@@ -243,15 +242,17 @@ IF (BUILD_CLAR)
ADD_DEFINITIONS(-DCLAR_RESOURCES=\"${TEST_RESOURCES}\")
INCLUDE_DIRECTORIES(${CLAR_PATH})
FILE(GLOB_RECURSE SRC_TEST ${CLAR_PATH}/*/*.c ${CLAR_PATH}/clar_helpers.c ${CLAR_PATH}/testlib.c)
FILE(GLOB_RECURSE SRC_TEST ${CLAR_PATH}/*/*.c ${CLAR_PATH}/clar_helpers.c)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-prototypes")
ADD_CUSTOM_COMMAND(
OUTPUT ${CLAR_PATH}/clar_main.c ${CLAR_PATH}/clar.h
COMMAND ${PYTHON_EXECUTABLE} clar .
DEPENDS ${CLAR_PATH}/clar ${SRC_TEST}
OUTPUT ${CLAR_PATH}/clar.suite
COMMAND ${PYTHON_EXECUTABLE} clar/generate.py .
DEPENDS ${CLAR_PATH}/clar.suite ${SRC_TEST}
WORKING_DIRECTORY ${CLAR_PATH}
)
ADD_EXECUTABLE(libgit2_clar ${SRC_GIT2} ${SRC_OS} ${CLAR_PATH}/clar_main.c ${SRC_TEST} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${SRC_SHA1})
ADD_EXECUTABLE(libgit2_clar ${SRC_GIT2} ${SRC_OS} ${CLAR_PATH}/main.c ${SRC_TEST} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${SRC_SHA1})
TARGET_LINK_LIBRARIES(libgit2_clar ${SSL_LIBRARIES})
TARGET_OS_LIBRARIES(libgit2_clar)
MSVC_SPLIT_SOURCES(libgit2_clar)
......
Subproject commit 161e8cd0f7642385d22153052fbcf770517de6c1
......@@ -2,17 +2,6 @@
#include "posix.h"
#include "path.h"
void clar_on_init(void)
{
git_threads_init();
}
void clar_on_shutdown(void)
{
giterr_clear();
git_threads_shutdown();
}
void cl_git_mkfile(const char *filename, const char *content)
{
int fd;
......
#ifndef __CLAR_LIBGIT2__
#define __CLAR_LIBGIT2__
#include "clar.h"
#include "clar/clar.h"
#include <git2.h>
#include "common.h"
......
#include "clar_libgit2.h"
int main(int argc, char *argv[])
{
int res;
git_threads_init();
/* Run the test suite */
res = clar_test(argc, argv);
giterr_clear();
git_threads_shutdown();
return res;
}
......@@ -3,8 +3,6 @@
#include "git2/clone.h"
#include "repository.h"
CL_IN_CATEGORY("network")
#define LIVE_REPO_URL "http://github.com/libgit2/TestGitRepository"
#define LIVE_EMPTYREPO_URL "http://github.com/libgit2/TestEmptyRepository"
......
#include "clar_libgit2.h"
CL_IN_CATEGORY("network")
static git_repository *_repo;
static int counter;
......
......@@ -2,11 +2,9 @@
#include "repository.h"
#include "fetchhead.h"
#include "fetchhead_data.h"
#include "../fetchhead/fetchhead_data.h"
#include "git2/clone.h"
CL_IN_CATEGORY("network")
#define LIVE_REPO_URL "git://github.com/libgit2/TestGitRepository"
static git_repository *g_repo;
......
......@@ -5,8 +5,6 @@
#include "../submodule/submodule_helpers.h"
#include "push_util.h"
CL_IN_CATEGORY("network")
static git_repository *_repo;
static char *_remote_url;
......
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