mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 08:25:58 +01:00
Clean up ci tasks.
Get the files to use the build directory again.
This commit is contained in:
@@ -49,7 +49,7 @@ namespace :test do
|
|||||||
RSpec::Core::RakeTask.new(:spec) do |t|
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
||||||
t.pattern = 'spec/**/*_spec.rb'
|
t.pattern = 'spec/**/*_spec.rb'
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Generate test summary"
|
desc "Generate test summary"
|
||||||
task :summary do
|
task :summary do
|
||||||
report_summary
|
report_summary
|
||||||
@@ -57,7 +57,7 @@ namespace :test do
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Shorthand for many common tasks
|
# Shorthand for many common tasks
|
||||||
task :all => [:clean, :prepare_for_tests, :scripts, :unit, :style, :summary]
|
task :all => ['test:all']
|
||||||
task :default => [:clobber, :all]
|
task :default => [:clobber, :all]
|
||||||
task :ci => [:no_color, :default]
|
task :ci => [:no_color, :default]
|
||||||
task :cruise => [:no_color, :default]
|
task :cruise => [:no_color, :default]
|
||||||
|
|||||||
@@ -135,18 +135,20 @@ module RakefileHelpers
|
|||||||
end
|
end
|
||||||
|
|
||||||
def compile(file, defines = [])
|
def compile(file, defines = [])
|
||||||
out_file = File.basename(file, C_EXTENSION) + $cfg[:extension][:object]
|
out_file = File.join('build', File.basename(file, C_EXTENSION)) + $cfg[:extension][:object]
|
||||||
cmd_str = build_command_string( $cfg[:tools][:test_compiler], [ file, out_file ], defines )
|
cmd_str = build_command_string( $cfg[:tools][:test_compiler], [ file, out_file ], defines )
|
||||||
execute(cmd_str)
|
execute(cmd_str)
|
||||||
out_file
|
out_file
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_it(exe_name, obj_list)
|
def link_it(exe_name, obj_list)
|
||||||
|
exe_name = File.join('build', File.basename(exe_name))
|
||||||
cmd_str = build_command_string( $cfg[:tools][:test_linker], [ obj_list, exe_name ] )
|
cmd_str = build_command_string( $cfg[:tools][:test_linker], [ obj_list, exe_name ] )
|
||||||
execute(cmd_str)
|
execute(cmd_str)
|
||||||
end
|
end
|
||||||
|
|
||||||
def runtest(bin_name, ok_to_fail = false, extra_args = nil)
|
def runtest(bin_name, ok_to_fail = false, extra_args = nil)
|
||||||
|
bin_name = File.join('build', File.basename(bin_name))
|
||||||
extra_args = extra_args.nil? ? "" : " " + extra_args
|
extra_args = extra_args.nil? ? "" : " " + extra_args
|
||||||
if $cfg[:tools][:test_fixture]
|
if $cfg[:tools][:test_fixture]
|
||||||
cmd_str = build_command_string( $cfg[:tools][:test_fixture], [ bin_name, extra_args ] )
|
cmd_str = build_command_string( $cfg[:tools][:test_fixture], [ bin_name, extra_args ] )
|
||||||
@@ -193,7 +195,6 @@ module RakefileHelpers
|
|||||||
|
|
||||||
# Build and execute each unit test
|
# Build and execute each unit test
|
||||||
test_files.each do |test|
|
test_files.each do |test|
|
||||||
puts "DEBUG: " + test
|
|
||||||
|
|
||||||
# Drop Out if we're skipping this type of test
|
# Drop Out if we're skipping this type of test
|
||||||
if $cfg[:skip_tests]
|
if $cfg[:skip_tests]
|
||||||
|
|||||||
Reference in New Issue
Block a user