Loading Makefile +15 −8 Original line number Diff line number Diff line Loading @@ -48,14 +48,6 @@ ci: uninstall all install @echo $(PROJECT) v$(VERSION) is in working order @echo test: Rakefile $(LIB_OBJS) @echo @echo -------------------------------------------------------------------------------- @echo Testing $(PROJECT) @echo -------------------------------------------------------------------------------- bundle install bundle exec rake ci clean: rm -rf $(BIN_DIR)/* $(OUT_DIR)/*.o *.core Loading Loading @@ -97,6 +89,21 @@ $(OUT_DIR)/kinetic_client.o: $(LIB_DIR)/kinetic_client.c $(LIB_DEPS) $(CC) -c -o $@ $< $(CFLAGS) $(LIB_INCS) #------------------------------------------------------------------------------- # Test Support #------------------------------------------------------------------------------- test: Rakefile $(LIB_OBJS) @echo @echo -------------------------------------------------------------------------------- @echo Testing $(PROJECT) @echo -------------------------------------------------------------------------------- bundle install bundle exec rake test_all JAVA_HOME ?= /usr JAVA_BIN = $(JAVA_HOME)/bin/java #------------------------------------------------------------------------------- # Static and Dynamic Library Build Support Loading Rakefile +1 −7 Original line number Diff line number Diff line Loading @@ -88,12 +88,6 @@ task :proto => [PROTO_OUT] do end desc "Analyze code w/CppCheck" task :cppcheck do raise "CppCheck not found!" unless `cppcheck --version` =~ /cppcheck \d+.\d+/mi execute_command "cppcheck ./src ./test ./build/temp/proto", "Analyzing code w/CppCheck" end namespace :doxygen do DOCS_PATH = "./docs/" Loading Loading @@ -394,7 +388,7 @@ end task :test_all => ['tests:unit', 'tests:integration', 'tests:system'] desc "Build all and run test utility" task :all => ['cppcheck', 'test_all', 'lib', 'utility', 'run'] task :all => ['test_all', 'lib', 'utility', 'run'] desc "Run full CI build" task :ci => ['clobber', 'all'] Loading include/kinetic_client.h +1 −1 Original line number Diff line number Diff line Loading @@ -119,6 +119,6 @@ KineticStatus KineticClient_Delete(KineticSessionHandle handle, * upon failure */ KineticStatus KineticClient_GetKeyRange(KineticSessionHandle handle, KineticKeyRange* range, ByteBuffer* keys[], int max_keys); KineticKeyRange* range, ByteBuffer keys[], int max_keys); #endif // _KINETIC_CLIENT_H include/kinetic_types.h +2 −1 Original line number Diff line number Diff line Loading @@ -40,9 +40,10 @@ #define KINETIC_TLS_PORT (8443) #define KINETIC_HMAC_SHA1_LEN (SHA_DIGEST_LENGTH) #define KINETIC_HMAC_MAX_LEN (KINETIC_HMAC_SHA1_LEN) #define KINETIC_DEFAULT_KEY_LEN (1024) #define KINETIC_MAX_KEY_LEN (4096) #define KINETIC_MAX_VERSION_LEN (256) #define PDU_VALUE_MAX_LEN (1024 * 1024) #define KINETIC_OBJ_SIZE (1024 * 1024) // Define max host name length // Some Linux environments require this, although not all, but it's benign. Loading src/lib/byte_array.c +4 −0 Original line number Diff line number Diff line #include "byte_array.h" #include <assert.h> #include <string.h> #include <stdio.h> ByteArray ByteArray_Create(void* data, size_t len) { Loading Loading @@ -81,10 +82,13 @@ ByteBuffer* ByteBuffer_Append(ByteBuffer* buffer, const void* data, size_t len) assert(buffer->array.data != NULL); assert(data != NULL); if (len == 0 || ((buffer->bytesUsed + len) > buffer->array.len)) { // printf("Invalid parameters for buffer copy!\n"); return NULL; } memcpy(&buffer->array.data[buffer->bytesUsed], data, len); buffer->bytesUsed += len; // printf("Appended data!\n") assert(buffer != NULL); return buffer; } Loading Loading
Makefile +15 −8 Original line number Diff line number Diff line Loading @@ -48,14 +48,6 @@ ci: uninstall all install @echo $(PROJECT) v$(VERSION) is in working order @echo test: Rakefile $(LIB_OBJS) @echo @echo -------------------------------------------------------------------------------- @echo Testing $(PROJECT) @echo -------------------------------------------------------------------------------- bundle install bundle exec rake ci clean: rm -rf $(BIN_DIR)/* $(OUT_DIR)/*.o *.core Loading Loading @@ -97,6 +89,21 @@ $(OUT_DIR)/kinetic_client.o: $(LIB_DIR)/kinetic_client.c $(LIB_DEPS) $(CC) -c -o $@ $< $(CFLAGS) $(LIB_INCS) #------------------------------------------------------------------------------- # Test Support #------------------------------------------------------------------------------- test: Rakefile $(LIB_OBJS) @echo @echo -------------------------------------------------------------------------------- @echo Testing $(PROJECT) @echo -------------------------------------------------------------------------------- bundle install bundle exec rake test_all JAVA_HOME ?= /usr JAVA_BIN = $(JAVA_HOME)/bin/java #------------------------------------------------------------------------------- # Static and Dynamic Library Build Support Loading
Rakefile +1 −7 Original line number Diff line number Diff line Loading @@ -88,12 +88,6 @@ task :proto => [PROTO_OUT] do end desc "Analyze code w/CppCheck" task :cppcheck do raise "CppCheck not found!" unless `cppcheck --version` =~ /cppcheck \d+.\d+/mi execute_command "cppcheck ./src ./test ./build/temp/proto", "Analyzing code w/CppCheck" end namespace :doxygen do DOCS_PATH = "./docs/" Loading Loading @@ -394,7 +388,7 @@ end task :test_all => ['tests:unit', 'tests:integration', 'tests:system'] desc "Build all and run test utility" task :all => ['cppcheck', 'test_all', 'lib', 'utility', 'run'] task :all => ['test_all', 'lib', 'utility', 'run'] desc "Run full CI build" task :ci => ['clobber', 'all'] Loading
include/kinetic_client.h +1 −1 Original line number Diff line number Diff line Loading @@ -119,6 +119,6 @@ KineticStatus KineticClient_Delete(KineticSessionHandle handle, * upon failure */ KineticStatus KineticClient_GetKeyRange(KineticSessionHandle handle, KineticKeyRange* range, ByteBuffer* keys[], int max_keys); KineticKeyRange* range, ByteBuffer keys[], int max_keys); #endif // _KINETIC_CLIENT_H
include/kinetic_types.h +2 −1 Original line number Diff line number Diff line Loading @@ -40,9 +40,10 @@ #define KINETIC_TLS_PORT (8443) #define KINETIC_HMAC_SHA1_LEN (SHA_DIGEST_LENGTH) #define KINETIC_HMAC_MAX_LEN (KINETIC_HMAC_SHA1_LEN) #define KINETIC_DEFAULT_KEY_LEN (1024) #define KINETIC_MAX_KEY_LEN (4096) #define KINETIC_MAX_VERSION_LEN (256) #define PDU_VALUE_MAX_LEN (1024 * 1024) #define KINETIC_OBJ_SIZE (1024 * 1024) // Define max host name length // Some Linux environments require this, although not all, but it's benign. Loading
src/lib/byte_array.c +4 −0 Original line number Diff line number Diff line #include "byte_array.h" #include <assert.h> #include <string.h> #include <stdio.h> ByteArray ByteArray_Create(void* data, size_t len) { Loading Loading @@ -81,10 +82,13 @@ ByteBuffer* ByteBuffer_Append(ByteBuffer* buffer, const void* data, size_t len) assert(buffer->array.data != NULL); assert(data != NULL); if (len == 0 || ((buffer->bytesUsed + len) > buffer->array.len)) { // printf("Invalid parameters for buffer copy!\n"); return NULL; } memcpy(&buffer->array.data[buffer->bytesUsed], data, len); buffer->bytesUsed += len; // printf("Appended data!\n") assert(buffer != NULL); return buffer; } Loading