1# ========================================== 2# Unity Project - A Test Framework for C 3# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 4# [Released under MIT License. Please refer to license.txt for details] 5# ========================================== 6 7require 'rake' 8require 'rake/clean' 9require 'rake/testtask' 10require_relative 'rakefile_helper' 11 12TEMP_DIRS = [ 13 File.join(__dir__, 'build') 14].freeze 15 16TEMP_DIRS.each do |dir| 17 directory(dir) 18 CLOBBER.include(dir) 19end 20 21task prepare_for_tests: TEMP_DIRS 22 23# Load default configuration, for now 24DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml'.freeze 25configure_toolchain(DEFAULT_CONFIG_FILE) 26 27task unit: [:prepare_for_tests] do 28 run_tests(false) 29 run_tests(true) 30end 31 32desc 'Build and test Unity Framework' 33task all: %i[clean unit] 34task default: %i[clobber all] 35task ci: %i[no_color default] 36task cruise: %i[no_color default] 37 38desc 'Load configuration' 39task :config, :config_file do |_t, args| 40 configure_toolchain(args[:config_file]) 41end 42 43task :no_color do 44 $colour_output = false 45end 46