• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
29end
30
31desc 'Build and test Unity Framework'
32task all: %i[clean unit]
33task default: %i[clobber all]
34task ci: %i[no_color default]
35task cruise: %i[no_color default]
36
37desc 'Load configuration'
38task :config, :config_file do |_t, args|
39  configure_toolchain(args[:config_file])
40end
41
42task :no_color do
43  $colour_output = false
44end
45