diff options
| author | Fuwn <[email protected]> | 2026-02-26 10:24:00 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-26 10:31:15 -0800 |
| commit | a14f361a60f55299e0057c419cc59e5194a77854 (patch) | |
| tree | edf54089f5849ee4dfdac48bd04bd8c271cfb62a /lab_6/unity/test/rakefile | |
| parent | feat(homework_2): Add implementation (diff) | |
| download | cst456-a14f361a60f55299e0057c419cc59e5194a77854.tar.xz cst456-a14f361a60f55299e0057c419cc59e5194a77854.zip | |
feat(lab_6): Add initial files
Diffstat (limited to 'lab_6/unity/test/rakefile')
| -rw-r--r-- | lab_6/unity/test/rakefile | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/lab_6/unity/test/rakefile b/lab_6/unity/test/rakefile new file mode 100644 index 0000000..779605e --- /dev/null +++ b/lab_6/unity/test/rakefile @@ -0,0 +1,60 @@ +# ==========================================
+# Unity Project - A Test Framework for C
+# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
+# [Released under MIT License. Please refer to license.txt for details]
+# ==========================================
+
+UNITY_ROOT = File.expand_path(File.dirname(__FILE__)) + '/'
+
+require 'rake'
+require 'rake/clean'
+require UNITY_ROOT + 'rakefile_helper'
+
+TEMP_DIRS = [
+ File.join(UNITY_ROOT, 'build')
+]
+
+TEMP_DIRS.each do |dir|
+ directory(dir)
+ CLOBBER.include(dir)
+end
+
+task :prepare_for_tests => TEMP_DIRS
+
+include RakefileHelpers
+
+# Load proper GCC as defult configuration
+DEFAULT_CONFIG_FILE = 'gcc_32.yml'
+configure_toolchain(DEFAULT_CONFIG_FILE)
+
+desc "Test unity with its own unit tests"
+task :unit => [:prepare_for_tests] do
+ run_tests get_unit_test_files
+end
+
+desc "Test unity's helper scripts"
+task :scripts => [:prepare_for_tests] do
+ Dir['tests/test_*.rb'].each do |scriptfile|
+ require "./"+scriptfile
+ end
+end
+
+desc "Generate test summary"
+task :summary do
+ report_summary
+end
+
+desc "Build and test Unity"
+task :all => [:clean, :prepare_for_tests, :scripts, :unit, :summary]
+task :default => [:clobber, :all]
+task :ci => [:no_color, :default]
+task :cruise => [:no_color, :default]
+
+desc "Load configuration"
+task :config, :config_file do |t, args|
+ configure_toolchain(args[:config_file])
+end
+
+task :no_color do
+ $colour_output = false
+end
|