leo hendrickson / Mbed OS example-Ethernet-mbed-Cloud-connect
Committer:
leothedragon
Date:
Tue May 04 08:55:12 2021 +0000
Revision:
0:8f0bb79ddd48
nmn

Who changed what in which revision?

UserRevisionLine numberNew contents of line
leothedragon 0:8f0bb79ddd48 1 # ==========================================
leothedragon 0:8f0bb79ddd48 2 # Unity Project - A Test Framework for C
leothedragon 0:8f0bb79ddd48 3 # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
leothedragon 0:8f0bb79ddd48 4 # [Released under MIT License. Please refer to license.txt for details]
leothedragon 0:8f0bb79ddd48 5 # ==========================================
leothedragon 0:8f0bb79ddd48 6
leothedragon 0:8f0bb79ddd48 7 UNITY_ROOT = File.expand_path(File.dirname(__FILE__)) + '/'
leothedragon 0:8f0bb79ddd48 8
leothedragon 0:8f0bb79ddd48 9 require 'rake'
leothedragon 0:8f0bb79ddd48 10 require 'rake/clean'
leothedragon 0:8f0bb79ddd48 11 require UNITY_ROOT + 'rakefile_helper'
leothedragon 0:8f0bb79ddd48 12
leothedragon 0:8f0bb79ddd48 13 TEMP_DIRS = [
leothedragon 0:8f0bb79ddd48 14 File.join(UNITY_ROOT, 'build')
leothedragon 0:8f0bb79ddd48 15 ]
leothedragon 0:8f0bb79ddd48 16
leothedragon 0:8f0bb79ddd48 17 TEMP_DIRS.each do |dir|
leothedragon 0:8f0bb79ddd48 18 directory(dir)
leothedragon 0:8f0bb79ddd48 19 CLOBBER.include(dir)
leothedragon 0:8f0bb79ddd48 20 end
leothedragon 0:8f0bb79ddd48 21
leothedragon 0:8f0bb79ddd48 22 task :prepare_for_tests => TEMP_DIRS
leothedragon 0:8f0bb79ddd48 23
leothedragon 0:8f0bb79ddd48 24 include RakefileHelpers
leothedragon 0:8f0bb79ddd48 25
leothedragon 0:8f0bb79ddd48 26 # Load proper GCC as defult configuration
leothedragon 0:8f0bb79ddd48 27 DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml'
leothedragon 0:8f0bb79ddd48 28 configure_toolchain(DEFAULT_CONFIG_FILE)
leothedragon 0:8f0bb79ddd48 29
leothedragon 0:8f0bb79ddd48 30 desc "Test unity with its own unit tests"
leothedragon 0:8f0bb79ddd48 31 task :unit => [:prepare_for_tests] do
leothedragon 0:8f0bb79ddd48 32 run_tests get_unit_test_files
leothedragon 0:8f0bb79ddd48 33 end
leothedragon 0:8f0bb79ddd48 34
leothedragon 0:8f0bb79ddd48 35 desc "Test unity's helper scripts"
leothedragon 0:8f0bb79ddd48 36 task :scripts => [:prepare_for_tests] do
leothedragon 0:8f0bb79ddd48 37 Dir['tests/test_*.rb'].each do |scriptfile|
leothedragon 0:8f0bb79ddd48 38 require "./"+scriptfile
leothedragon 0:8f0bb79ddd48 39 end
leothedragon 0:8f0bb79ddd48 40 end
leothedragon 0:8f0bb79ddd48 41
leothedragon 0:8f0bb79ddd48 42 desc "Generate test summary"
leothedragon 0:8f0bb79ddd48 43 task :summary do
leothedragon 0:8f0bb79ddd48 44 report_summary
leothedragon 0:8f0bb79ddd48 45 end
leothedragon 0:8f0bb79ddd48 46
leothedragon 0:8f0bb79ddd48 47 desc "Build and test Unity"
leothedragon 0:8f0bb79ddd48 48 task :all => [:clean, :prepare_for_tests, :scripts, :unit, :summary]
leothedragon 0:8f0bb79ddd48 49 task :default => [:clobber, :all]
leothedragon 0:8f0bb79ddd48 50 task :ci => [:no_color, :default]
leothedragon 0:8f0bb79ddd48 51 task :cruise => [:no_color, :default]
leothedragon 0:8f0bb79ddd48 52
leothedragon 0:8f0bb79ddd48 53 desc "Load configuration"
leothedragon 0:8f0bb79ddd48 54 task :config, :config_file do |t, args|
leothedragon 0:8f0bb79ddd48 55 configure_toolchain(args[:config_file])
leothedragon 0:8f0bb79ddd48 56 end
leothedragon 0:8f0bb79ddd48 57
leothedragon 0:8f0bb79ddd48 58 task :no_color do
leothedragon 0:8f0bb79ddd48 59 $colour_output = false
leothedragon 0:8f0bb79ddd48 60 end