From ac2e205ae9f465c27297ea542c72e8cfe4966f8c Mon Sep 17 00:00:00 2001 From: Willian Paixao Date: Sun, 5 Dec 2021 19:16:34 +0100 Subject: remove tinyusb directory --- .../module_generator/config/module_generator.yml | 4 -- .../module_generator/lib/module_generator.rb | 70 ---------------------- .../plugins/module_generator/module_generator.rake | 47 --------------- 3 files changed, 121 deletions(-) delete mode 100755 tinyusb/test/vendor/ceedling/plugins/module_generator/config/module_generator.yml delete mode 100755 tinyusb/test/vendor/ceedling/plugins/module_generator/lib/module_generator.rb delete mode 100755 tinyusb/test/vendor/ceedling/plugins/module_generator/module_generator.rake (limited to 'tinyusb/test/vendor/ceedling/plugins/module_generator') diff --git a/tinyusb/test/vendor/ceedling/plugins/module_generator/config/module_generator.yml b/tinyusb/test/vendor/ceedling/plugins/module_generator/config/module_generator.yml deleted file mode 100755 index cdb2da2e..00000000 --- a/tinyusb/test/vendor/ceedling/plugins/module_generator/config/module_generator.yml +++ /dev/null @@ -1,4 +0,0 @@ -:module_generator: - :project_root: ./ - :source_root: src/ - :test_root: test/ \ No newline at end of file diff --git a/tinyusb/test/vendor/ceedling/plugins/module_generator/lib/module_generator.rb b/tinyusb/test/vendor/ceedling/plugins/module_generator/lib/module_generator.rb deleted file mode 100755 index b2fac006..00000000 --- a/tinyusb/test/vendor/ceedling/plugins/module_generator/lib/module_generator.rb +++ /dev/null @@ -1,70 +0,0 @@ -require 'ceedling/plugin' -require 'ceedling/constants' -require 'erb' -require 'fileutils' - -class ModuleGenerator < Plugin - - attr_reader :config - - def create(module_name, optz={}) - - require "generate_module.rb" #From Unity Scripts - - if ((!optz.nil?) && (optz[:destroy])) - UnityModuleGenerator.new( divine_options(optz) ).destroy(module_name) - else - UnityModuleGenerator.new( divine_options(optz) ).generate(module_name) - end - end - - private - - def divine_options(optz={}) - unity_generator_options = - { - :path_src => ((defined? MODULE_GENERATOR_SOURCE_ROOT ) ? MODULE_GENERATOR_SOURCE_ROOT.gsub('\\', '/').sub(/^\//, '').sub(/\/$/, '') : "src" ), - :path_inc => ((defined? MODULE_GENERATOR_INC_ROOT ) ? - MODULE_GENERATOR_INC_ROOT.gsub('\\', '/').sub(/^\//, '').sub(/\/$/, '') - : (defined? MODULE_GENERATOR_SOURCE_ROOT ) ? - MODULE_GENERATOR_SOURCE_ROOT.gsub('\\', '/').sub(/^\//, '').sub(/\/$/, '') - : "src" ), - :path_tst => ((defined? MODULE_GENERATOR_TEST_ROOT ) ? MODULE_GENERATOR_TEST_ROOT.gsub( '\\', '/').sub(/^\//, '').sub(/\/$/, '') : "test" ), - :pattern => optz[:pattern], - :test_prefix => ((defined? PROJECT_TEST_FILE_PREFIX ) ? PROJECT_TEST_FILE_PREFIX : "Test" ), - :mock_prefix => ((defined? CMOCK_MOCK_PREFIX ) ? CMOCK_MOCK_PREFIX : "Mock" ), - :includes => ((defined? MODULE_GENERATOR_INCLUDES ) ? MODULE_GENERATOR_INCLUDES : {} ), - :boilerplates => ((defined? MODULE_GENERATOR_BOILERPLATES) ? MODULE_GENERATOR_BOILERPLATES : {} ), - :naming => ((defined? MODULE_GENERATOR_NAMING ) ? MODULE_GENERATOR_NAMING : nil ), - :update_svn => ((defined? MODULE_GENERATOR_UPDATE_SVN ) ? MODULE_GENERATOR_UPDATE_SVN : false ), - } - - # Read Boilerplate template file. - if (defined? MODULE_GENERATOR_BOILERPLATE_FILES) - - bf = MODULE_GENERATOR_BOILERPLATE_FILES - - if !bf[:src].nil? && File.exists?(bf[:src]) - unity_generator_options[:boilerplates][:src] = File.read(bf[:src]) - end - - if !bf[:inc].nil? && File.exists?(bf[:inc]) - unity_generator_options[:boilerplates][:inc] = File.read(bf[:inc]) - end - - if !bf[:tst].nil? && File.exists?(bf[:tst]) - unity_generator_options[:boilerplates][:tst] = File.read(bf[:tst]) - end - end - - # If using "create[:]" option from command line. - unless optz[:module_root_path].to_s.empty? - unity_generator_options[:path_src] = File.join(optz[:module_root_path], unity_generator_options[:path_src]) - unity_generator_options[:path_inc] = File.join(optz[:module_root_path], unity_generator_options[:path_inc]) - unity_generator_options[:path_tst] = File.join(optz[:module_root_path], unity_generator_options[:path_tst]) - end - - return unity_generator_options - end - -end diff --git a/tinyusb/test/vendor/ceedling/plugins/module_generator/module_generator.rake b/tinyusb/test/vendor/ceedling/plugins/module_generator/module_generator.rake deleted file mode 100755 index e88e346a..00000000 --- a/tinyusb/test/vendor/ceedling/plugins/module_generator/module_generator.rake +++ /dev/null @@ -1,47 +0,0 @@ - -namespace :module do - module_root_separator = ":" - - desc "Generate module (source, header and test files)" - task :create, :module_path do |t, args| - files = [args[:module_path]] + (args.extras || []) - optz = { :module_root_path => "" } - ["dh", "dih", "mch", "mvp", "src", "test"].each do |pat| - p = files.delete(pat) - optz[:pattern] = p unless p.nil? - end - files.each do |v| - module_root_path, module_name = v.split(module_root_separator, 2) - if module_name - optz[:module_root_path] = module_root_path - v = module_name - end - if (v =~ /^test_?/i) - # If the name of the file starts with test, automatically treat it as one - @ceedling[:module_generator].create(v.sub(/^test_?/i,''), optz.merge({:pattern => 'test'})) - else - # Otherwise, go through the normal procedure - @ceedling[:module_generator].create(v, optz) - end - end - end - - desc "Destroy module (source, header and test files)" - task :destroy, :module_path do |t, args| - files = [args[:module_path]] + (args.extras || []) - optz = { :destroy => true, :module_root_path => "" } - ["dh", "dih", "mch", "mvp", "src", "test"].each do |pat| - p = files.delete(pat) - optz[:pattern] = p unless p.nil? - end - files.each do |v| - module_root_path, module_name = v.split(module_root_separator, 2) - if module_name - optz[:module_root_path] = module_root_path - v = module_name - end - @ceedling[:module_generator].create(v, optz) - end - end - -end -- cgit v1.2.3