Merge task table and task log into a single table (#30)

* Merge task table and task log

* Fix test in db tests

* Address Robert's comments and some better error checking

* Add a LOG_FATAL that exits the program
This commit is contained in:
Stephanie Wang
2016-11-10 18:13:26 -08:00
committed by Philipp Moritz
parent 194bdb1d96
commit 9d1e750e8f
30 changed files with 1578 additions and 842 deletions
+6 -6
View File
@@ -4,7 +4,7 @@ BUILD = build
all: hiredis $(BUILD)/libcommon.a
$(BUILD)/libcommon.a: event_loop.o common.o task.o io.o state/redis.o state/table.o state/object_table.o state/task_log.o thirdparty/ae/ae.o thirdparty/sha256.o
$(BUILD)/libcommon.a: event_loop.o common.o task.o io.o state/redis.o state/table.o state/object_table.o state/task_table.o thirdparty/ae/ae.o thirdparty/sha256.o
ar rcs $@ $^
$(BUILD)/common_tests: test/common_tests.c $(BUILD)/libcommon.a
@@ -16,8 +16,8 @@ $(BUILD)/db_tests: hiredis test/db_tests.c $(BUILD)/libcommon.a
$(BUILD)/object_table_tests: hiredis test/object_table_tests.c $(BUILD)/libcommon.a
$(CC) -o $@ test/object_table_tests.c $(BUILD)/libcommon.a thirdparty/hiredis/libhiredis.a $(CFLAGS)
$(BUILD)/task_log_tests: hiredis test/task_log_tests.c $(BUILD)/libcommon.a
$(CC) -o $@ test/task_log_tests.c $(BUILD)/libcommon.a thirdparty/hiredis/libhiredis.a $(CFLAGS)
$(BUILD)/task_table_tests: hiredis test/task_table_tests.c $(BUILD)/libcommon.a
$(CC) -o $@ test/task_table_tests.c $(BUILD)/libcommon.a thirdparty/hiredis/libhiredis.a $(CFLAGS)
$(BUILD)/io_tests: test/io_tests.c $(BUILD)/libcommon.a
$(CC) -o $@ $^ $(CFLAGS)
@@ -38,7 +38,7 @@ redis:
hiredis:
git submodule update --init --recursive -- "thirdparty/hiredis" ; cd thirdparty/hiredis ; make
test: hiredis redis $(BUILD)/common_tests $(BUILD)/task_log_tests $(BUILD)/object_table_tests $(BUILD)/db_tests $(BUILD)/io_tests $(BUILD)/task_tests $(BUILD)/redis_tests FORCE
test: hiredis redis $(BUILD)/common_tests $(BUILD)/task_table_tests $(BUILD)/object_table_tests $(BUILD)/db_tests $(BUILD)/io_tests $(BUILD)/task_tests $(BUILD)/redis_tests FORCE
./thirdparty/redis-3.2.3/src/redis-server &
sleep 1s
./build/common_tests
@@ -46,7 +46,7 @@ test: hiredis redis $(BUILD)/common_tests $(BUILD)/task_log_tests $(BUILD)/objec
./build/io_tests
./build/task_tests
./build/redis_tests
./build/task_log_tests
./build/task_table_tests
./build/object_table_tests
valgrind: test
@@ -55,7 +55,7 @@ valgrind: test
valgrind --leak-check=full --error-exitcode=1 ./build/io_tests
valgrind --leak-check=full --error-exitcode=1 ./build/task_tests
valgrind --leak-check=full --error-exitcode=1 ./build/redis_tests
valgrind --leak-check=full --error-exitcode=1 ./build/task_log_tests
valgrind --leak-check=full --error-exitcode=1 ./build/task_table_tests
valgrind --leak-check=full --error-exitcode=1 ./build/object_table_tests
FORCE: