2017-02-07 23:30:57 +03:00
|
|
|
# ==========================================
|
|
|
|
# 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]
|
|
|
|
# ==========================================
|
|
|
|
|
|
|
|
HERE = File.expand_path(File.dirname(__FILE__)) + '/'
|
|
|
|
|
|
|
|
require 'rake'
|
|
|
|
require 'rake/clean'
|
|
|
|
require 'rake/testtask'
|
|
|
|
require HERE + 'rakefile_helper'
|
|
|
|
|
|
|
|
TEMP_DIRS = [
|
2017-04-27 03:54:33 +03:00
|
|
|
File.join(HERE, 'build')
|
|
|
|
].freeze
|
2017-02-07 23:30:57 +03:00
|
|
|
|
|
|
|
TEMP_DIRS.each do |dir|
|
|
|
|
directory(dir)
|
|
|
|
CLOBBER.include(dir)
|
|
|
|
end
|
|
|
|
|
2017-04-27 03:54:33 +03:00
|
|
|
task prepare_for_tests: TEMP_DIRS
|
2017-02-07 23:30:57 +03:00
|
|
|
|
|
|
|
include RakefileHelpers
|
|
|
|
|
|
|
|
# Load default configuration, for now
|
2017-04-27 03:54:33 +03:00
|
|
|
DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml'.freeze
|
2017-02-07 23:30:57 +03:00
|
|
|
configure_toolchain(DEFAULT_CONFIG_FILE)
|
|
|
|
|
2017-04-27 03:54:33 +03:00
|
|
|
task unit: [:prepare_for_tests] do
|
2017-02-07 23:30:57 +03:00
|
|
|
run_tests
|
|
|
|
end
|
|
|
|
|
2017-04-27 03:54:33 +03:00
|
|
|
desc 'Build and test Unity Framework'
|
|
|
|
task all: %i(clean unit)
|
|
|
|
task default: %i(clobber all)
|
|
|
|
task ci: %i(no_color default)
|
|
|
|
task cruise: %i(no_color default)
|
2017-02-07 23:30:57 +03:00
|
|
|
|
2017-04-27 03:54:33 +03:00
|
|
|
desc 'Load configuration'
|
|
|
|
task :config, :config_file do |_t, args|
|
2017-02-07 23:30:57 +03:00
|
|
|
configure_toolchain(args[:config_file])
|
|
|
|
end
|
|
|
|
|
|
|
|
task :no_color do
|
|
|
|
$colour_output = false
|
|
|
|
end
|