forked from Open-Systems-Pharmacology/OSPSuite.Core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrakefile.rb
47 lines (35 loc) · 1.23 KB
/
rakefile.rb
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
require_relative 'scripts/coverage'
require_relative 'scripts/copy-dependencies'
task :cover do
filter = []
filter << "+[OSPSuite.Core]*"
filter << "+[OSPSuite.Infrastructure]*"
filter << "+[OSPSuite.Presentation]*"
#exclude namespaces that are tested from applications
filter << "-[OSPSuite.Infrastructure]OSPSuite.Infrastructure.Reporting*"
filter << "-[OSPSuite.Infrastructure]OSPSuite.Infrastructure.Serialization.ORM*"
filter << "-[OSPSuite.Presentation]OSPSuite.Presentation.MenuAndBars*"
filter << "-[OSPSuite.Presentation]OSPSuite.Presentation.Presenters.ContextMenus*"
Coverage.cover(filter, "OSPSuite.Core.Tests.csproj")
end
task :copy_to_pksim do
copy_to_app '../PK-Sim/src/PKSim/bin/Debug/'
end
task :copy_to_mobi do
copy_to_app '../MoBi/src/MoBi/bin/Debug/'
end
private
def copy_to_app(app_target_relative_path)
app_target_path = File.join(solution_dir, app_target_relative_path)
source_dir = File.join(src_dir, 'OSPSuite.UI', 'bin', 'Debug')
copy_depdencies source_dir, app_target_path do
copy_file 'OSPSuite.*.dll'
copy_file 'OSPSuite.*.pdb'
end
end
def solution_dir
File.dirname(__FILE__)
end
def src_dir
File.join(solution_dir, 'src')
end