mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 00:15:58 +01:00
Refactor all yaml files for self-tests to fit Ceedling format for wider reuse.
Fix mistake in unity selftest without output spy running. Namespace self-tests for consistency across ThrowTheSwitch projects (like being able to test:all) Reduce clutter of NAMED self-tests in task list.
This commit is contained in:
@@ -29,31 +29,31 @@ include RakefileHelpers
|
||||
DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml'
|
||||
configure_toolchain(DEFAULT_CONFIG_FILE)
|
||||
|
||||
desc "Test unity with its own unit tests"
|
||||
task :unit => [:prepare_for_tests] do
|
||||
run_tests unit_test_files
|
||||
end
|
||||
|
||||
desc "Test unity's helper scripts"
|
||||
task :scripts => [:prepare_for_tests] do
|
||||
Dir['tests/test_*.rb'].each do |scriptfile|
|
||||
require "./"+scriptfile
|
||||
end
|
||||
end
|
||||
|
||||
desc "Run all rspecs"
|
||||
RSpec::Core::RakeTask.new(:spec) do |t|
|
||||
t.pattern = 'spec/**/*_spec.rb'
|
||||
end
|
||||
|
||||
desc "Generate test summary"
|
||||
task :summary do
|
||||
report_summary
|
||||
end
|
||||
|
||||
namespace :test do
|
||||
desc "Build and test Unity"
|
||||
task :all => [:clean, :prepare_for_tests, :scripts, :unit, :style, :summary]
|
||||
task :all => [:clean, :prepare_for_tests, 'test:scripts', 'test:unit', :style, 'test:summary']
|
||||
|
||||
desc "Test unity with its own unit tests"
|
||||
task :unit => [:prepare_for_tests] do
|
||||
run_tests unit_test_files
|
||||
end
|
||||
|
||||
desc "Test unity's helper scripts"
|
||||
task :scripts => [:prepare_for_tests] do
|
||||
Dir['tests/test_*.rb'].each do |scriptfile|
|
||||
require "./"+scriptfile
|
||||
end
|
||||
end
|
||||
|
||||
desc "Run all rspecs"
|
||||
RSpec::Core::RakeTask.new(:spec) do |t|
|
||||
t.pattern = 'spec/**/*_spec.rb'
|
||||
end
|
||||
|
||||
desc "Generate test summary"
|
||||
task :summary do
|
||||
report_summary
|
||||
end
|
||||
end
|
||||
|
||||
# Shorthand for many common tasks
|
||||
@@ -86,7 +86,7 @@ namespace :style do
|
||||
namespace :check do
|
||||
Dir['../**/*.rb'].each do |f|
|
||||
filename = File.basename(f, '.rb')
|
||||
desc "Check Style of #{filename}"
|
||||
#desc "Check Style of #{filename}"
|
||||
task filename.to_sym => ['style:clean'] do
|
||||
report execute("rubocop #{f} --color --config .rubocop.yml", true)
|
||||
report "Style Checked for #{f}"
|
||||
@@ -102,7 +102,7 @@ namespace :style do
|
||||
namespace :c do
|
||||
Dir['../{src,extras/**}/*.{c,h}'].each do |f|
|
||||
filename = File.basename(f)[0..-3]
|
||||
desc "Check Style of #{filename}"
|
||||
#desc "Check Style of #{filename}"
|
||||
task filename.to_sym do
|
||||
run_astyle f
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user