Commit 1ab4fc95 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Merge branch 'ng-src' into ng

parents 993981a0 fde85202
include ../Makefile.common include ../src/Makefile.common
STD= -std=c99 -pedantic
OPT= -O0
WARN= -Wall -W
HIREDIS_CFLAGS+= -I../src
TESTS=test-format test-parser test-object test-handle test-context test-request TESTS=test-format test-parser test-object test-handle test-context test-request
OBJ=spawn.o net-helper.o OBJ=spawn.o net-helper.o
all: $(TESTS) all: $(TESTS)
../$(STLIBNAME): ../src/$(STLIBNAME):
cd .. && $(MAKE) $(STLIBNAME) cd .. && $(MAKE) $(STLIBNAME)
test-%: test-%.o $(OBJ) ../$(STLIBNAME) test-%: test-%.o $(OBJ) ../src/$(STLIBNAME)
$(CC) -o $@ $(REAL_LDFLAGS) $^ $(HIREDIS_LD) -o $@ $^ $(FINAL_LIBS)
.c.o: .c.o:
$(CC) -std=c99 -pedantic -c -O0 $(REAL_CFLAGS) $< $(HIREDIS_CC) -c $<
clean: clean:
rm -f *.o $(TESTS) rm -f *.o $(TESTS)
...@@ -20,6 +25,6 @@ clean: ...@@ -20,6 +25,6 @@ clean:
-include ./Makefile.dep -include ./Makefile.dep
dep: dep:
$(CC) -MM *.c > Makefile.dep $(HIREDIS_CC) -MM *.c > Makefile.dep
.PHONY: all clean dep .PHONY: all clean dep
#ifndef TEST_NET_HELPER #ifndef TEST_NET_HELPER
#define TEST_NET_HELPER 1 #define TEST_NET_HELPER 1
#include "../handle.h" #include "handle.h"
typedef struct run_server_args_s run_server_args; typedef struct run_server_args_s run_server_args;
......
#include "../fmacros.h" #include "fmacros.h"
/* misc */ /* misc */
#include <stdlib.h> #include <stdlib.h>
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
#include <unistd.h> #include <unistd.h>
/* local */ /* local */
#include "../context.h" #include "context.h"
#include "../object.h" #include "object.h"
#include "test-helper.h" #include "test-helper.h"
#include "net-helper.h" #include "net-helper.h"
......
#include "../fmacros.h" #include "fmacros.h"
/* misc */ /* misc */
#include <stdlib.h> #include <stdlib.h>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <assert.h> #include <assert.h>
/* local */ /* local */
#include "../format.h" #include "format.h"
#include "test-helper.h" #include "test-helper.h"
#define SETUP() \ #define SETUP() \
......
#include "../fmacros.h" #include "fmacros.h"
/* misc */ /* misc */
#include <stdlib.h> #include <stdlib.h>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <netdb.h> #include <netdb.h>
/* local */ /* local */
#include "../handle.h" #include "handle.h"
#include "test-helper.h" #include "test-helper.h"
TEST(connect_in_refused) { TEST(connect_in_refused) {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
/* local */ /* local */
#include "spawn.h" #include "spawn.h"
#include "../handle.h" #include "handle.h"
#ifdef __GNUC__ #ifdef __GNUC__
#define UNUSED __attribute__ ((unused)) #define UNUSED __attribute__ ((unused))
......
#include "../fmacros.h" #include "fmacros.h"
/* misc */ /* misc */
#include <stdlib.h> #include <stdlib.h>
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
/* local */ /* local */
#include "test-helper.h" #include "test-helper.h"
#include "../parser.h" #include "parser.h"
#include "../object.h" #include "object.h"
void test_string(redis_parser *parser) { void test_string(redis_parser *parser) {
const char *buf = "$5\r\nhello\r\n"; const char *buf = "$5\r\nhello\r\n";
......
#include "../fmacros.h" #include "fmacros.h"
/* misc */ /* misc */
#include <stdlib.h> #include <stdlib.h>
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
/* local */ /* local */
#include "test-helper.h" #include "test-helper.h"
#include "../parser.h" #include "parser.h"
#include "../sds.h" #include "sds.h"
typedef struct log_entry_s log_entry_t; typedef struct log_entry_s log_entry_t;
......
#include "../fmacros.h" #include "fmacros.h"
/* misc */ /* misc */
#include <stdlib.h> #include <stdlib.h>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <errno.h> #include <errno.h>
/* local */ /* local */
#include "../request.h" #include "request.h"
#include "test-helper.h" #include "test-helper.h"
static struct request_to_write_cb_s { static struct request_to_write_cb_s {
......
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