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