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