Loading DEVELOP.md +27 −22 Original line number Diff line number Diff line Loading @@ -3,38 +3,43 @@ Kinetic-C Library Developer Reference Prerequisites ------------- * [Ruby](https://www.ruby-lang.org) (v1.9.3 or higher) scripting language * [RubyGems](http://rubygems.org) (installed w/ `bundle install) * [bundler](http://bundler.io) (v1.3.5 or higher) environment/dependency manager for Ruby projects * [CppCheck](http://cppcheck.sourceforge.net/) for static analysis of source code * Managed gems (installed w/ `bundle install`) * [rake](https://rubygems.org/gems/rake) Make-like build system * [ceedling](https://github.com/ThrowTheSwitch/Ceedling) Build system which extends rake to add support for interaction-based testing * [Valgrind](http://valgrind.org/) for validation of memory usage/management * [Doxygen](https://github.com/doxygen) and [GraphViz](http://www.graphviz.org/) for generating API documentation * [Doxygen](https://github.com/doxygen) * [GraphViz](http://www.graphviz.org/) used by Doxygen for generating visualizations/graphs API Documentation ================= [Kinetic-C API](http://seagate.github.io/kinetic-c/) (generated with Doxygen) ----------------- [Kinetic-C API Documentation](http://seagate.github.io/kinetic-c/) (generated with Doxygen) * [Kinetic-C API](http://seagate.github.io/kinetic-c/kinetic__client_8h.html) * [Kinetic-C types](http://seagate.github.io/kinetic-c/kinetic__types_8h.html) * [ByteArray API](http://seagate.github.io/kinetic-c/byte__array_8h.html) * The ByteArray and ByteBuffer types are used for exchanging variable length byte-arrays with kinetic-c * e.g. object keys, object value data, etc. Common Developer Tasks ---------------------- **NOTE: Prefix the following commands with `bundle exec` so that they execute in the context of the bundle environment setup via `bundle install`.** * List available Rake tasks w/descriptions * `rake -T` * Run all tests and build the library and examples * `rake` * Build the library * `rake release` * Run all unit/integration/system/example tests * `rake test_all` * Analyze code * `rake cppcheck` * Generate documentation * `rake doxygen:gen` * `make` * Run all tests and build the library and examples * `make all` * Run all unit/integration tests * `make test` * Run all system tests * `make system_tests` * Apply license to source files (skips already licensed files) * `rake apply_license` * `make apply_license` Developer Tasks via Rake ------------------------ * Generate API documentation * `rake doxygen:gen` * Generate and publish public API documentation * `rake doxygen:update_public_api` * Build/install Google Protocol Buffers support for the Kinetic-Protocol * `rake proto` * Enable verbose output (for current Rake run) * `rake verbose <task_A> <task_B>` Rakefile +31 −40 Original line number Diff line number Diff line Loading @@ -4,15 +4,6 @@ compiler_info = `#{compiler} --version 2>&1`.strip SYSTEM_TEST_HOST = ENV.fetch('SYSTEM_TEST_HOST', "localhost") task :report_toolchain do report_banner("Toolchain Configuration") report "" + " compiler:\n" + " location: #{compiler_location}\n" + " info:\n" + " " + compiler_info.gsub(/\n/, "\n ") + "\n" end require 'ceedling' Ceedling.load_project(config: './config/project.yml') Loading Loading @@ -58,9 +49,38 @@ CLOBBER.include PROTO_OUT directory TEST_TEMP CLOBBER.include TEST_TEMP task :clobber task :report_toolchain do report_banner("Toolchain Configuration") report "" + "compiler:\n" + " location: #{compiler_location}\n" + " info:\n" + " " + compiler_info.gsub(/\n/, "\n ") end task :test => ['report_toolchain', 'test:delta'] namespace :tests do desc "Run unit tests" task :unit => ['report_toolchain'] do report_banner "Running Unit Tests" Rake::Task['test:path'].reenable Rake::Task['test:path'].invoke('test/unit') end desc "Run integration tests" task :integration => ['report_toolchain'] do report_banner "Running Integration Tests" Rake::Task['test:path'].reenable Rake::Task['test:path'].invoke('test/integration') end end task :test => ['test:delta'] task :test_all => ['report_toolchain', 'tests:unit', 'tests:integration'] task :default => ['report_toolchain', 'test:delta'] desc "Generate protocol buffers" task :proto => [PROTO_OUT] do Loading Loading @@ -128,32 +148,3 @@ namespace :doxygen do end end desc "Prepend license to source files" task :apply_license do Dir['include/**/*.h', 'src/**/*.h', 'src/**/*.c', 'test/**/*.h', 'test/**/*.c'].each do |f| sh "config/apply_license.sh #{f}" end end namespace :tests do desc "Run unit tests" task :unit do report_banner "Running Unit Tests" Rake::Task['test:path'].reenable Rake::Task['test:path'].invoke('test/unit') end desc "Run integration tests" task :integration do report_banner "Running Integration Tests" Rake::Task['test:path'].reenable Rake::Task['test:path'].invoke('test/integration') end end task :test_all => ['report_toolchain', 'tests:unit', 'tests:integration'] task :default => ['test:delta'] config/project.yml +4 −19 Original line number Diff line number Diff line Loading @@ -54,10 +54,6 @@ :enforce_strict_ordering: true :plugins: - :ignore # - :ignore_args # - :array # - :cexception # - :callback - :return_thru_ptr :unity_helper_path: test/support/unity_helper.h :includes_h_post_orig_header: Loading @@ -84,6 +80,8 @@ - -D"$": COLLECTION_DEFINES_TEST_AND_VENDOR - -D"$": DEFINES_TEST_PREPROCESS - -DGNU_COMPILER - -D_POSIX_C_SOURCE=199309L - -D_C99_SOURCE=1 - -std=c99 - -g - -Wall Loading @@ -91,13 +89,7 @@ - -Werror - -pedantic - -Wstrict-prototypes # - -Werror=strict-prototypes - -Werror=implicit-function-declaration # - -Wincompatible-pointer-types # - -Werror=incompatible-pointer-types # - -Wcast-align - -D_POSIX_C_SOURCE=199309L - -D_C99_SOURCE=1 - ${1} :test_compiler: :executable: "#{ENV.fetch('CC', 'gcc')}" Loading @@ -106,21 +98,15 @@ - -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE - -D"$": COLLECTION_DEFINES_TEST_AND_VENDOR - -DGNU_COMPILER - -D_POSIX_C_SOURCE=199309L - -D_C99_SOURCE=1 - -std=c99 - -g - -Wall - -Wextra #- -Werror - -Wno-pragmas # - -pedantic - -Wstrict-prototypes # - -Werror=strict-prototypes - -Werror=implicit-function-declaration # - -Wincompatible-pointer-types # - -Werror=incompatible-pointer-types # - -Wcast-align - -D_POSIX_C_SOURCE=199309L - -D_C99_SOURCE=1 - -Wno-nonnull - -Wno-address - -Wno-missing-field-initializers Loading @@ -142,5 +128,4 @@ - "#{Ceedling.load_path}" :enabled: - stdout_ide_tests_report - module_generator ... Loading
DEVELOP.md +27 −22 Original line number Diff line number Diff line Loading @@ -3,38 +3,43 @@ Kinetic-C Library Developer Reference Prerequisites ------------- * [Ruby](https://www.ruby-lang.org) (v1.9.3 or higher) scripting language * [RubyGems](http://rubygems.org) (installed w/ `bundle install) * [bundler](http://bundler.io) (v1.3.5 or higher) environment/dependency manager for Ruby projects * [CppCheck](http://cppcheck.sourceforge.net/) for static analysis of source code * Managed gems (installed w/ `bundle install`) * [rake](https://rubygems.org/gems/rake) Make-like build system * [ceedling](https://github.com/ThrowTheSwitch/Ceedling) Build system which extends rake to add support for interaction-based testing * [Valgrind](http://valgrind.org/) for validation of memory usage/management * [Doxygen](https://github.com/doxygen) and [GraphViz](http://www.graphviz.org/) for generating API documentation * [Doxygen](https://github.com/doxygen) * [GraphViz](http://www.graphviz.org/) used by Doxygen for generating visualizations/graphs API Documentation ================= [Kinetic-C API](http://seagate.github.io/kinetic-c/) (generated with Doxygen) ----------------- [Kinetic-C API Documentation](http://seagate.github.io/kinetic-c/) (generated with Doxygen) * [Kinetic-C API](http://seagate.github.io/kinetic-c/kinetic__client_8h.html) * [Kinetic-C types](http://seagate.github.io/kinetic-c/kinetic__types_8h.html) * [ByteArray API](http://seagate.github.io/kinetic-c/byte__array_8h.html) * The ByteArray and ByteBuffer types are used for exchanging variable length byte-arrays with kinetic-c * e.g. object keys, object value data, etc. Common Developer Tasks ---------------------- **NOTE: Prefix the following commands with `bundle exec` so that they execute in the context of the bundle environment setup via `bundle install`.** * List available Rake tasks w/descriptions * `rake -T` * Run all tests and build the library and examples * `rake` * Build the library * `rake release` * Run all unit/integration/system/example tests * `rake test_all` * Analyze code * `rake cppcheck` * Generate documentation * `rake doxygen:gen` * `make` * Run all tests and build the library and examples * `make all` * Run all unit/integration tests * `make test` * Run all system tests * `make system_tests` * Apply license to source files (skips already licensed files) * `rake apply_license` * `make apply_license` Developer Tasks via Rake ------------------------ * Generate API documentation * `rake doxygen:gen` * Generate and publish public API documentation * `rake doxygen:update_public_api` * Build/install Google Protocol Buffers support for the Kinetic-Protocol * `rake proto` * Enable verbose output (for current Rake run) * `rake verbose <task_A> <task_B>`
Rakefile +31 −40 Original line number Diff line number Diff line Loading @@ -4,15 +4,6 @@ compiler_info = `#{compiler} --version 2>&1`.strip SYSTEM_TEST_HOST = ENV.fetch('SYSTEM_TEST_HOST', "localhost") task :report_toolchain do report_banner("Toolchain Configuration") report "" + " compiler:\n" + " location: #{compiler_location}\n" + " info:\n" + " " + compiler_info.gsub(/\n/, "\n ") + "\n" end require 'ceedling' Ceedling.load_project(config: './config/project.yml') Loading Loading @@ -58,9 +49,38 @@ CLOBBER.include PROTO_OUT directory TEST_TEMP CLOBBER.include TEST_TEMP task :clobber task :report_toolchain do report_banner("Toolchain Configuration") report "" + "compiler:\n" + " location: #{compiler_location}\n" + " info:\n" + " " + compiler_info.gsub(/\n/, "\n ") end task :test => ['report_toolchain', 'test:delta'] namespace :tests do desc "Run unit tests" task :unit => ['report_toolchain'] do report_banner "Running Unit Tests" Rake::Task['test:path'].reenable Rake::Task['test:path'].invoke('test/unit') end desc "Run integration tests" task :integration => ['report_toolchain'] do report_banner "Running Integration Tests" Rake::Task['test:path'].reenable Rake::Task['test:path'].invoke('test/integration') end end task :test => ['test:delta'] task :test_all => ['report_toolchain', 'tests:unit', 'tests:integration'] task :default => ['report_toolchain', 'test:delta'] desc "Generate protocol buffers" task :proto => [PROTO_OUT] do Loading Loading @@ -128,32 +148,3 @@ namespace :doxygen do end end desc "Prepend license to source files" task :apply_license do Dir['include/**/*.h', 'src/**/*.h', 'src/**/*.c', 'test/**/*.h', 'test/**/*.c'].each do |f| sh "config/apply_license.sh #{f}" end end namespace :tests do desc "Run unit tests" task :unit do report_banner "Running Unit Tests" Rake::Task['test:path'].reenable Rake::Task['test:path'].invoke('test/unit') end desc "Run integration tests" task :integration do report_banner "Running Integration Tests" Rake::Task['test:path'].reenable Rake::Task['test:path'].invoke('test/integration') end end task :test_all => ['report_toolchain', 'tests:unit', 'tests:integration'] task :default => ['test:delta']
config/project.yml +4 −19 Original line number Diff line number Diff line Loading @@ -54,10 +54,6 @@ :enforce_strict_ordering: true :plugins: - :ignore # - :ignore_args # - :array # - :cexception # - :callback - :return_thru_ptr :unity_helper_path: test/support/unity_helper.h :includes_h_post_orig_header: Loading @@ -84,6 +80,8 @@ - -D"$": COLLECTION_DEFINES_TEST_AND_VENDOR - -D"$": DEFINES_TEST_PREPROCESS - -DGNU_COMPILER - -D_POSIX_C_SOURCE=199309L - -D_C99_SOURCE=1 - -std=c99 - -g - -Wall Loading @@ -91,13 +89,7 @@ - -Werror - -pedantic - -Wstrict-prototypes # - -Werror=strict-prototypes - -Werror=implicit-function-declaration # - -Wincompatible-pointer-types # - -Werror=incompatible-pointer-types # - -Wcast-align - -D_POSIX_C_SOURCE=199309L - -D_C99_SOURCE=1 - ${1} :test_compiler: :executable: "#{ENV.fetch('CC', 'gcc')}" Loading @@ -106,21 +98,15 @@ - -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE - -D"$": COLLECTION_DEFINES_TEST_AND_VENDOR - -DGNU_COMPILER - -D_POSIX_C_SOURCE=199309L - -D_C99_SOURCE=1 - -std=c99 - -g - -Wall - -Wextra #- -Werror - -Wno-pragmas # - -pedantic - -Wstrict-prototypes # - -Werror=strict-prototypes - -Werror=implicit-function-declaration # - -Wincompatible-pointer-types # - -Werror=incompatible-pointer-types # - -Wcast-align - -D_POSIX_C_SOURCE=199309L - -D_C99_SOURCE=1 - -Wno-nonnull - -Wno-address - -Wno-missing-field-initializers Loading @@ -142,5 +128,4 @@ - "#{Ceedling.load_path}" :enabled: - stdout_ide_tests_report - module_generator ...