rakefile.rb 884 字节
Newer Older
W
Warwick Stone 已提交
1 2 3 4 5
HERE = File.expand_path(File.dirname(__FILE__)) + '/'
UNITY_ROOT = File.expand_path(File.dirname(__FILE__)) + '/../..'

require 'rake'
require 'rake/clean'
6
require HERE + 'rakefile_helper'
W
Warwick Stone 已提交
7 8

TEMP_DIRS = [
9 10
  File.join(HERE, 'build')
].freeze
W
Warwick Stone 已提交
11 12 13 14 15 16

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

17
task prepare_for_tests: TEMP_DIRS
W
Warwick Stone 已提交
18 19 20 21

include RakefileHelpers

# Load default configuration, for now
22
DEFAULT_CONFIG_FILE = 'target_gcc_32.yml'.freeze
W
Warwick Stone 已提交
23 24
configure_toolchain(DEFAULT_CONFIG_FILE)

25
task unit: [:prepare_for_tests] do
26
  run_tests unit_test_files
W
Warwick Stone 已提交
27 28
end

29
desc 'Generate test summary'
W
Warwick Stone 已提交
30 31 32 33
task :summary do
  report_summary
end

34
desc 'Build and test Unity'
35 36
task all: %i(clean unit summary)
task default: %i(clobber all)
37 38
task ci: [:default]
task cruise: [:default]
W
Warwick Stone 已提交
39

40 41
desc 'Load configuration'
task :config, :config_file do |_t, args|
W
Warwick Stone 已提交
42 43
  configure_toolchain(args[:config_file])
end