mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 00:15:58 +01:00
Centralize all testing to the test folder instead of each subproject.
Trigger ALL tests when calling `rake test:all` instead of that being just the core tests.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
# ==========================================
|
||||
|
||||
$verbose = false
|
||||
$extra_paths = []
|
||||
|
||||
require 'rake'
|
||||
require 'rake/clean'
|
||||
@@ -29,9 +30,10 @@ include RakefileHelpers
|
||||
DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml'
|
||||
configure_toolchain(DEFAULT_CONFIG_FILE)
|
||||
|
||||
############# ALL THE SELF-TESTS WE CAN PERFORM
|
||||
namespace :test do
|
||||
desc "Build and test Unity"
|
||||
task :all => [:clean, :prepare_for_tests, 'test:scripts', 'test:unit', :style, 'test:summary']
|
||||
task :all => [:clean, :prepare_for_tests, 'test:scripts', 'test:unit', :style, 'test:make', 'test:fixture', 'test:memory', 'test:summary']
|
||||
|
||||
desc "Test unity with its own unit tests"
|
||||
task :unit => [:prepare_for_tests] do
|
||||
@@ -45,6 +47,28 @@ namespace :test do
|
||||
end
|
||||
end
|
||||
|
||||
desc "Test unity triggered from make"
|
||||
task :make => [:prepare_for_tests] do
|
||||
run_make_tests()
|
||||
end
|
||||
|
||||
desc "Test unity fixture addon"
|
||||
task :fixture => [:prepare_for_tests] do
|
||||
test_fixtures()
|
||||
end
|
||||
|
||||
desc "Test unity memory addon"
|
||||
task :memory => [:prepare_for_tests] do
|
||||
test_memory()
|
||||
end
|
||||
|
||||
desc "Test unity examples"
|
||||
task :examples => [:prepare_for_tests] do
|
||||
execute("cd ../examples/example_1 && make -s ci", false)
|
||||
execute("cd ../examples/example_2 && make -s ci", false)
|
||||
execute("cd ../examples/example_3 && rake", false)
|
||||
end
|
||||
|
||||
desc "Run all rspecs"
|
||||
RSpec::Core::RakeTask.new(:spec) do |t|
|
||||
t.pattern = 'spec/**/*_spec.rb'
|
||||
@@ -56,11 +80,10 @@ namespace :test do
|
||||
end
|
||||
end
|
||||
|
||||
# Shorthand for many common tasks
|
||||
###################### Shorthand for many common tasks
|
||||
task :all => ['test:all']
|
||||
task :default => [:clobber, :all]
|
||||
task :ci => [:no_color, :default]
|
||||
task :cruise => [:no_color, :default]
|
||||
|
||||
desc "Load configuration"
|
||||
task :config, :config_file do |t, args|
|
||||
@@ -75,6 +98,7 @@ task :verbose do
|
||||
$verbose = true
|
||||
end
|
||||
|
||||
################### CODING STYLE VALIDATION
|
||||
namespace :style do
|
||||
desc "Check style"
|
||||
task :check do
|
||||
|
||||
Reference in New Issue
Block a user