rakefile.rb 1.0 KB
Newer Older
1 2 3 4 5 6 7 8 9
# ==========================================
#   Unity Project - A Test Framework for C
#   Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
#   [Released under MIT License. Please refer to license.txt for details]
# ==========================================

require 'rake'
require 'rake/clean'
require 'rake/testtask'
J
John Lindgren 已提交
10
require_relative 'rakefile_helper'
11 12

TEMP_DIRS = [
J
John Lindgren 已提交
13
  File.join(__dir__, 'build')
14
].freeze
15 16 17 18 19 20

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

21
task prepare_for_tests: TEMP_DIRS
22 23

# Load default configuration, for now
24
DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml'.freeze
25 26
configure_toolchain(DEFAULT_CONFIG_FILE)

27
task unit: [:prepare_for_tests] do
28 29 30
  run_tests
end

31
desc 'Build and test Unity Framework'
J
John Lindgren 已提交
32 33 34 35
task all: %i[clean unit]
task default: %i[clobber all]
task ci: %i[no_color default]
task cruise: %i[no_color default]
36

37 38
desc 'Load configuration'
task :config, :config_file do |_t, args|
39 40 41 42 43 44
  configure_toolchain(args[:config_file])
end

task :no_color do
  $colour_output = false
end