rakefile.rb 892 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. HERE = File.expand_path(File.dirname(__FILE__)) + '/'
  2. UNITY_ROOT = File.expand_path(File.dirname(__FILE__)) + '/../..'
  3. require 'rake'
  4. require 'rake/clean'
  5. require HERE+'rakefile_helper'
  6. TEMP_DIRS = [
  7. File.join(HERE, 'build')
  8. ]
  9. TEMP_DIRS.each do |dir|
  10. directory(dir)
  11. CLOBBER.include(dir)
  12. end
  13. task :prepare_for_tests => TEMP_DIRS
  14. include RakefileHelpers
  15. # Load default configuration, for now
  16. DEFAULT_CONFIG_FILE = 'target_gcc_32.yml'
  17. configure_toolchain(DEFAULT_CONFIG_FILE)
  18. task :unit => [:prepare_for_tests] do
  19. run_tests get_unit_test_files
  20. end
  21. desc "Generate test summary"
  22. task :summary do
  23. report_summary
  24. end
  25. desc "Build and test Unity"
  26. task :all => [:clean, :unit, :summary]
  27. task :default => [:clobber, :all]
  28. task :ci => [:default]
  29. task :cruise => [:default]
  30. desc "Load configuration"
  31. task :config, :config_file do |t, args|
  32. configure_toolchain(args[:config_file])
  33. end