• 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
7HERE = File.expand_path(File.dirname(__FILE__)) + '/'
8
9require 'rake'
10require 'rake/clean'
11require 'rake/testtask'
12require HERE + 'rakefile_helper'
13
14TEMP_DIRS = [
15  File.join(HERE, 'build')
16].freeze
17
18TEMP_DIRS.each do |dir|
19  directory(dir)
20  CLOBBER.include(dir)
21end
22
23task prepare_for_tests: TEMP_DIRS
24
25include RakefileHelpers
26
27# Load default configuration, for now
28DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml'.freeze
29configure_toolchain(DEFAULT_CONFIG_FILE)
30
31task unit: [:prepare_for_tests] do
32  run_tests
33end
34
35desc 'Build and test Unity Framework'
36task all: %i(clean unit)
37task default: %i(clobber all)
38task ci: %i(no_color default)
39task cruise: %i(no_color default)
40
41desc 'Load configuration'
42task :config, :config_file do |_t, args|
43  configure_toolchain(args[:config_file])
44end
45
46task :no_color do
47  $colour_output = false
48end
49