Skip to content

Commit

Permalink
Added directory task to create temp build/ folder, and added .gitigno…
Browse files Browse the repository at this point in the history
…re to prevent this new folder form being tracked by git.
  • Loading branch information
Greg Williams authored and sw17ch committed Jun 20, 2012
1 parent 91ea65c commit 4724af1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
19 changes: 15 additions & 4 deletions rakefile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,23 @@
# [Released under MIT License. Please refer to license.txt for details]
# ==========================================

HERE = File.expand_path(File.dirname(__FILE__)) + '/'
UNITY_ROOT = File.expand_path(File.dirname(__FILE__)) + '/'

require 'rake'
require 'rake/clean'
require 'rake/testtask'
require HERE + 'rakefile_helper'
require UNITY_ROOT + 'rakefile_helper'

TEMP_DIRS = [
File.join(UNITY_ROOT, 'build')
]

TEMP_DIRS.each do |dir|
directory(dir)
CLOBBER.include(dir)
end

task :prepare_for_tests => TEMP_DIRS

include RakefileHelpers

Expand All @@ -18,7 +29,7 @@
configure_toolchain(DEFAULT_CONFIG_FILE)

desc "Test unity with its own unit tests"
task :unit do
task :unit => [:prepare_for_tests] do
run_tests get_unit_test_files
end

Expand All @@ -33,7 +44,7 @@
end

desc "Build and test Unity"
task :all => [:clean, :scripts, :unit, :summary]
task :all => [:clean, :prepare_for_tests, :scripts, :unit, :summary]
task :default => [:clobber, :all]
task :ci => [:no_color, :default]
task :cruise => [:no_color, :default]
Expand Down
8 changes: 4 additions & 4 deletions rakefile_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

require 'yaml'
require 'fileutils'
require HERE+'auto/unity_test_summary'
require HERE+'auto/generate_test_runner'
require HERE+'auto/colour_reporter'
require UNITY_ROOT + 'auto/unity_test_summary'
require UNITY_ROOT + 'auto/generate_test_runner'
require UNITY_ROOT + 'auto/colour_reporter'

module RakefileHelpers

Expand Down Expand Up @@ -163,7 +163,7 @@ def execute(command_string, verbose=true)

def report_summary
summary = UnityTestSummary.new
summary.set_root_path(HERE)
summary.set_root_path(UNITY_ROOT )
results_glob = "#{$cfg['compiler']['build_path']}*.test*"
results_glob.gsub!(/\\/, '/')
results = Dir[results_glob]
Expand Down

0 comments on commit 4724af1

Please sign in to comment.