-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathrakefile.rb
More file actions
26 lines (22 loc) · 1.06 KB
/
rakefile.rb
File metadata and controls
26 lines (22 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
PROJECT_CEEDLING_ROOT = "vendor/ceedling"
load "#{PROJECT_CEEDLING_ROOT}/lib/ceedling.rb"
load "#{PROJECT_CEEDLING_ROOT}/lib/ceedling/rakefile.rb"
# Ceedling.load_project
ENV['GCOV_BUILD_PATH'] = "build/gcov/out"
task :default => %w[ test:all ]
desc "Generate LCOV test coverage report"
task :lcov => %w[ gcov:all ] do #
top_dir = `pwd`.chomp
puts top_dir
cmd = "rm -rf build/gcov/out/mock_* && rm -rf build/gcov/out/test_* && rm -rf build/gcov/out/cmock* && rm -rf build/gcov/out/unity* && mkdir -p build/lcov && lcov --capture --directory build/gcov/out --output-file coverage.info && genhtml -s -p #{top_dir} --legend coverage.info --output-directory build/lcov"
puts cmd
sh cmd
end
desc "Generate LCOV test coverage report (for Travis CI)"
task :travis => %w[ gcov:all ] do #
top_dir = `pwd`.chomp
puts top_dir
cmd = "rm -rf build/gcov/out/mock_* && rm -rf build/gcov/out/test_* && rm -rf build/gcov/out/cmock* && rm -rf build/gcov/out/unity* && mkdir -p build/lcov && lcov --capture --directory build/gcov/out --output-file coverage.info"
puts cmd
sh cmd
end