rakefile.rb 1.1 KB

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