rake-delphi 0.0.33 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Rakefile.rb +1 -1
- data/lib/rake/common/sendmailtask.rb +1 -5
- data/lib/rake/delphi/dcc32.rb +11 -4
- data/lib/rake/delphi/paclient.rb +3 -1
- data/lib/rake/delphi/project.rb +1 -1
- data/lib/rake/delphi/projectinfo.rb +13 -7
- data/lib/rake/delphi/version.rb +1 -1
- data/test/resources/testproject-android/TestProject.xe5.dproj +3 -3
- data/test/resources/testproject-android/TestProject.xe7.dproj +3 -3
- data/test/resources/testproject-android/resources/some-deployment-file-with-operation-eq-0-class +0 -0
- data/test/resources/testproject/Rakefile.rb +3 -0
- data/test/resources/testproject/testproject.dpr +13 -0
- data/test/test-delphi.rb +60 -5
- data/test/test-projectinfo-android-xe7.rb +28 -1
- data/test/test-projectinfo-android.rb +25 -1
- metadata +4 -4
- data/test/resources/testproject/extended_resources.dres +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9bb89ff1359c294d2ae1bc5e2a60f6f7e37fe65
|
4
|
+
data.tar.gz: 7b9c30e7a4903b079e385663b8fe57e45e43c1aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f16296d3b94d7280d09e138ff80bb71b019a342ad020af2686064105653aeb5f401cabb562891d6b8a958888e2a4fe165e7ccfd647a2bba3957ad2e50e523e8e
|
7
|
+
data.tar.gz: df15b814a2c42abebf4bc6b08f66d7f9b358278890fd8b12add008519835a6b1fb6d21a17ba9ad835664f9b4e25276b2b1bd5a1bd57c30bd91c234db41ba52c1
|
data/Gemfile.lock
CHANGED
data/Rakefile.rb
CHANGED
@@ -15,7 +15,7 @@ end
|
|
15
15
|
Rake::TestTask.new('test:no:delphi') do |t|
|
16
16
|
t.ruby_opts << '-d' if Rake.application.options.trace
|
17
17
|
t.libs << 'test'
|
18
|
-
t.test_files = FileList['test/test
|
18
|
+
t.test_files = FileList['test/test*.rb'].delete_if do |f|
|
19
19
|
# exclude "delphi" tests
|
20
20
|
/delphi/.match(f)
|
21
21
|
end
|
data/lib/rake/delphi/dcc32.rb
CHANGED
@@ -20,7 +20,7 @@ module Rake
|
|
20
20
|
private
|
21
21
|
@@symbols = [:quiet, :assertions, :build, :optimization, :debug, :defines,
|
22
22
|
:debuginfo, :localsymbols, :console, :warnings, :hints, :altercfg,
|
23
|
-
:includepaths, :writeableconst,
|
23
|
+
:includepaths, :writeableconst, :boolean,
|
24
24
|
:map, :dcuoutput, :bploutput,
|
25
25
|
:aliases, :platform, :platform_configuration, :namespaces,
|
26
26
|
:dcpoutput, :dcu, :uselibrarypath, :usecfg, :dcc_options]
|
@@ -120,6 +120,7 @@ module Rake
|
|
120
120
|
end
|
121
121
|
|
122
122
|
def _paths(ppaths)
|
123
|
+
ppaths = ppaths.dup
|
123
124
|
ppaths.map! do |p|
|
124
125
|
a = []
|
125
126
|
['U', 'I', 'R', 'O'].each do |s|
|
@@ -190,7 +191,7 @@ module Rake
|
|
190
191
|
end
|
191
192
|
|
192
193
|
def _alldebuginfo
|
193
|
-
return @debuginfo ? '-$D+ -$L+ -$YD' : '-$D- -$L- -$Y-'
|
194
|
+
return @debuginfo.nil? ? '' : (@debuginfo ? '-$D+ -$L+ -$YD' : '-$D- -$L- -$Y-')
|
194
195
|
end
|
195
196
|
|
196
197
|
def outputs
|
@@ -213,10 +214,16 @@ module Rake
|
|
213
214
|
return '-$J' + (@writeableconst ? '+' : '-')
|
214
215
|
end
|
215
216
|
|
217
|
+
def _complete_booleans
|
218
|
+
return @boolean.nil? ? '' : ('-$B' + (@boolean == :full ? '+' : '-'))
|
219
|
+
end
|
220
|
+
|
216
221
|
def build_args
|
217
222
|
args = []
|
218
|
-
args << @dccTool.options << dcc_options << build? << console?
|
219
|
-
args <<
|
223
|
+
args << @dccTool.options << dcc_options << build? << console?
|
224
|
+
args << warnings? << hints? << quiet? << debug? << _alldebuginfo << _map
|
225
|
+
args << _defines << _writeableconst << _complete_booleans
|
226
|
+
args << _aliases << _namespaces
|
220
227
|
args << _source << outputs << implicitpaths
|
221
228
|
args.flatten
|
222
229
|
end
|
data/lib/rake/delphi/paclient.rb
CHANGED
@@ -115,7 +115,9 @@ module Rake
|
|
115
115
|
deploymentfiles.each do |file|
|
116
116
|
return file[:project_so] if file[:project_so]
|
117
117
|
end
|
118
|
-
fail 'Cannot find :project_so in files
|
118
|
+
fail 'Cannot find :project_so in files!
|
119
|
+
Please check :platform_configuration property for the Dcc32Task!
|
120
|
+
This error may occur if :platform_configuration is set to an incorrect value'
|
119
121
|
end
|
120
122
|
|
121
123
|
def get_stripdebug_arg(paclientTool)
|
data/lib/rake/delphi/project.rb
CHANGED
@@ -50,7 +50,7 @@ module Rake
|
|
50
50
|
@cdir = File.dirname(rake_file)
|
51
51
|
self[:systempath] = @cdir + '/' + projectfile
|
52
52
|
self[:altercfg].prepend(self[:sourcename] + '/') if self[:altercfg]
|
53
|
-
[:version, :bin, :build, :dcu, :
|
53
|
+
[:version, :bin, :build, :dcu, :debug, :debuginfo, :map, :defines, :releaseCandidate].each do |k|
|
54
54
|
self[k] = vars[k] if vars.has_key?(k)
|
55
55
|
end if vars
|
56
56
|
|
@@ -157,15 +157,23 @@ module Rake
|
|
157
157
|
|
158
158
|
def make_deployment(files, classes, configuration)
|
159
159
|
r = []
|
160
|
+
configuration = configuration.to_s
|
161
|
+
if configuration.empty?
|
162
|
+
warn 'WARNING! Platform configuration is not set, \'Debug\' is assumed!'
|
163
|
+
configuration = 'Debug'
|
164
|
+
end
|
160
165
|
Logger.trace(Logger::TRACE, "Gathering deployment files for '#{configuration}'")
|
161
|
-
configuration = configuration.
|
166
|
+
configuration = configuration.downcase.to_sym
|
162
167
|
files.each do |file, value|
|
163
168
|
value = value[configuration]
|
164
|
-
|
169
|
+
unless value
|
170
|
+
Logger.trace(Logger::TRACE, "Skip #{file}: it has no entity for the configuration")
|
171
|
+
next
|
172
|
+
end
|
165
173
|
value_class = value['Class']
|
166
174
|
_class = classes[value_class]
|
167
175
|
if ['AndroidGDBServer', 'ProjectAndroidManifest'].include?(value_class)
|
168
|
-
Logger.trace(Logger::TRACE, "Skip #{file} of '#{value_class}'")
|
176
|
+
Logger.trace(Logger::TRACE, "Skip '#{file}' of '#{value_class}'")
|
169
177
|
next
|
170
178
|
end
|
171
179
|
if is_special_class_for_bds_path(value_class)
|
@@ -173,7 +181,7 @@ module Rake
|
|
173
181
|
# usually .dproj has full path to it
|
174
182
|
# but we may have another path
|
175
183
|
# so remove 'first' part
|
176
|
-
Logger.trace(Logger::TRACE, "#{file} of '#{value_class}' is a special case: prepend with $(BDS)")
|
184
|
+
Logger.trace(Logger::TRACE, "'#{file}' of '#{value_class}' is a special case: prepend with $(BDS)")
|
177
185
|
file = file.gsub(/^.+(\\lib\\android\\)/, '$(BDS)\1')
|
178
186
|
end
|
179
187
|
remote_name = value['Platform'] ? value['Platform']['RemoteName'] : file.dos2unix_separator.pathmap('%f')
|
@@ -182,9 +190,6 @@ module Rake
|
|
182
190
|
file = :project_so
|
183
191
|
elsif value_class == 'ProjectFile'
|
184
192
|
_class = value
|
185
|
-
elsif _class['Platform']['Operation'].to_i == 0
|
186
|
-
Logger.trace(Logger::TRACE, "Operation=0 for '#{value_class}'")
|
187
|
-
next
|
188
193
|
else
|
189
194
|
remote_dir = value['Platform']['RemoteDir'] if value['Platform']
|
190
195
|
end
|
@@ -193,6 +198,7 @@ module Rake
|
|
193
198
|
remote_dir += '\\'
|
194
199
|
r << { file => [remote_dir, '1', remote_name] }
|
195
200
|
end
|
201
|
+
warn "WARNING! There are no files for the platform configuration '#{configuration}'!" if r.empty?
|
196
202
|
return r
|
197
203
|
end
|
198
204
|
|
data/lib/rake/delphi/version.rb
CHANGED
@@ -298,17 +298,17 @@
|
|
298
298
|
<RemoteName>ic_launcher.png</RemoteName>
|
299
299
|
</Platform>
|
300
300
|
</DeployFile>
|
301
|
-
<DeployFile LocalName="some
|
301
|
+
<DeployFile LocalName="resources\some-deployment-file-with-operation-eq-0-class" Configuration="Debug" Class="File">
|
302
302
|
<Platform Name="Android">
|
303
303
|
<RemoteName>release.conf</RemoteName>
|
304
304
|
</Platform>
|
305
305
|
</DeployFile>
|
306
|
-
<DeployFile LocalName="some
|
306
|
+
<DeployFile LocalName="resources\some-disabled-deployment-file-from-disabled.release.conf" Configuration="Release" Class="FileOperation0">
|
307
307
|
<Platform Name="Android">
|
308
308
|
<RemoteName>disabled.release.conf.file</RemoteName>
|
309
309
|
</Platform>
|
310
310
|
</DeployFile>
|
311
|
-
<DeployFile LocalName="some
|
311
|
+
<DeployFile LocalName="resources\some-deployment-file-from-enabled.release.conf" Configuration="Release" Class="FileOperation1">
|
312
312
|
<Platform Name="Android">
|
313
313
|
<RemoteName>enabled.release.conf.file</RemoteName>
|
314
314
|
</Platform>
|
@@ -306,17 +306,17 @@
|
|
306
306
|
<RemoteName>ic_launcher.png</RemoteName>
|
307
307
|
</Platform>
|
308
308
|
</DeployFile>
|
309
|
-
<DeployFile LocalName="some
|
309
|
+
<DeployFile LocalName="resources\some-deployment-file-with-operation-eq-0-class" Configuration="Debug" Class="File">
|
310
310
|
<Platform Name="Android">
|
311
311
|
<RemoteName>release.conf</RemoteName>
|
312
312
|
</Platform>
|
313
313
|
</DeployFile>
|
314
|
-
<DeployFile LocalName="some
|
314
|
+
<DeployFile LocalName="resources\some-disabled-deployment-file-from-disabled.release.conf" Configuration="Release" Class="FileOperation0">
|
315
315
|
<Platform Name="Android">
|
316
316
|
<RemoteName>disabled.release.conf.file</RemoteName>
|
317
317
|
</Platform>
|
318
318
|
</DeployFile>
|
319
|
-
<DeployFile LocalName="some
|
319
|
+
<DeployFile LocalName="resources\some-deployment-file-from-enabled.release.conf" Configuration="Release" Class="FileOperation1">
|
320
320
|
<Platform Name="Android">
|
321
321
|
<RemoteName>enabled.release.conf.file</RemoteName>
|
322
322
|
</Platform>
|
data/test/resources/testproject-android/resources/some-deployment-file-with-operation-eq-0-class
ADDED
File without changes
|
@@ -32,6 +32,9 @@ namespace :test do
|
|
32
32
|
_task = Rake::Task['test:compile']
|
33
33
|
dpr = Rake.application.define_task(Rake::Delphi::Project, (_task.name + ':delphi').to_sym)
|
34
34
|
dpr[:quiet] = true
|
35
|
+
# always reset :map
|
36
|
+
dpr[:map] = false
|
37
|
+
dpr[:boolean] = :fast
|
35
38
|
dpr[:resources_additional] = []
|
36
39
|
dpr[:resources_additional] << 'resources' if opts[:useresources]
|
37
40
|
dpr[:resources_additional] << 'resources_ext:extended_resources.dres' if opts[:useresources] === 'ext'
|
@@ -52,6 +52,15 @@ end;
|
|
52
52
|
|
53
53
|
var
|
54
54
|
s: string;
|
55
|
+
|
56
|
+
{$IFDEF TEST_BOOLEAN_EXPRESSIONS}
|
57
|
+
function WriteIfFullBooleanExpressions(): Boolean;
|
58
|
+
begin
|
59
|
+
s := s + '-=BOOLEAN EXPRESSION=-';
|
60
|
+
Result := False;
|
61
|
+
end;
|
62
|
+
{$ENDIF TEST_BOOLEAN_EXPRESSIONS}
|
63
|
+
|
55
64
|
begin
|
56
65
|
{$IFDEF DEBUG}
|
57
66
|
Write('DEBUG: ');
|
@@ -84,5 +93,9 @@ begin
|
|
84
93
|
Free;
|
85
94
|
end;
|
86
95
|
{$ENDIF}
|
96
|
+
{$IFDEF TEST_BOOLEAN_EXPRESSIONS}
|
97
|
+
if False and WriteIfFullBooleanExpressions() then
|
98
|
+
;
|
99
|
+
{$ENDIF TEST_BOOLEAN_EXPRESSIONS}
|
87
100
|
WriteLn('testproject works', s);
|
88
101
|
end.
|
data/test/test-delphi.rb
CHANGED
@@ -16,6 +16,9 @@ module DelphiTests
|
|
16
16
|
class TestDelphi < TestVerInfo
|
17
17
|
private
|
18
18
|
def _test_prepare(prepare_args)
|
19
|
+
# -$D+ flag is the default for dcc32, so turn off debuginfo explicitly
|
20
|
+
# if it's not set
|
21
|
+
prepare_args[:debuginfo] = false if prepare_args[:debuginfo].nil? && ! prepare_args[:debug]
|
19
22
|
args = [:altercfg, :usecfg, :defines, :debuginfo, :debug, :includepaths]
|
20
23
|
# reinitialize arguments (even absent ones)
|
21
24
|
args.each do |arg|
|
@@ -40,13 +43,18 @@ private
|
|
40
43
|
prepare_task.invoke(useresources, prepare_args)
|
41
44
|
end
|
42
45
|
|
43
|
-
def _test_compile_and_output(prepare_args, output)
|
44
|
-
_test_prepare
|
46
|
+
def _test_compile_and_output(prepare_args, output, check_map_file = false)
|
47
|
+
# we mayset `prepare_args` to nil to skip `_test_prepare`
|
48
|
+
_test_prepare(prepare_args) if prepare_args
|
45
49
|
# reenable tasks (!!! after invoking 'test:prepare')
|
46
50
|
task = ::Rake::Task['test:compile']
|
47
51
|
task.reenable_chain
|
48
52
|
task.invoke
|
49
53
|
|
54
|
+
unless check_map_file.nil?
|
55
|
+
assert_equal check_map_file, File.exists?(map_file), 'File %s existance' % map_file
|
56
|
+
end
|
57
|
+
|
50
58
|
assert(File.exists?(exe), 'File %s does not exist' % exe)
|
51
59
|
out = `#{exe}`.chomp
|
52
60
|
assert_equal output, out, 'exe output'
|
@@ -56,13 +64,17 @@ private
|
|
56
64
|
return PROJECT_EXE % name.gsub(/[():]/, '_')
|
57
65
|
end
|
58
66
|
|
67
|
+
def map_file
|
68
|
+
exe.pathmap('%X.map')
|
69
|
+
end
|
70
|
+
|
59
71
|
public
|
60
72
|
def setup
|
61
73
|
Rake::Delphi::Dcc32Tool.reinit
|
62
74
|
ENV['DELPHI_DIR'] = nil
|
63
75
|
super
|
64
76
|
ENV['RAKE_DIR'] = PROJECT_PATH
|
65
|
-
[exe, PROJECT_PATH + '/resources.res', PROJECT_PATH + '/extended_resources.dres'].each do |file|
|
77
|
+
[exe, map_file, PROJECT_PATH + '/resources.res', PROJECT_PATH + '/extended_resources.dres'].each do |file|
|
66
78
|
File.unlink(file) if File.exists?(file)
|
67
79
|
end
|
68
80
|
require PROJECT_PATH + '/Rakefile.rb'
|
@@ -85,9 +97,45 @@ public
|
|
85
97
|
'DEBUG: testproject works')
|
86
98
|
end
|
87
99
|
|
88
|
-
def
|
100
|
+
def test_compile_boolean_expressions_fast
|
101
|
+
_test_compile_and_output({:defines => 'TEST_BOOLEAN_EXPRESSIONS'},
|
102
|
+
'testproject works')
|
103
|
+
end
|
104
|
+
|
105
|
+
def test_compile_boolean_expressions_full
|
106
|
+
_test_compile_and_output({:boolean => :full,
|
107
|
+
:defines => 'TEST_BOOLEAN_EXPRESSIONS'},
|
108
|
+
'testproject works-=BOOLEAN EXPRESSION=-')
|
109
|
+
end
|
110
|
+
|
111
|
+
def test_compile_debug_only_on
|
112
|
+
_test_compile_and_output({:debug => true},
|
113
|
+
'D+: testproject works', true)
|
114
|
+
end
|
115
|
+
|
116
|
+
def test_compile_debug_only_off
|
117
|
+
_test_compile_and_output({:debug => false},
|
118
|
+
'testproject works')
|
119
|
+
end
|
120
|
+
|
121
|
+
def test_compile_debuginfo_only_on
|
122
|
+
_test_compile_and_output({:debuginfo => true},
|
123
|
+
'D+: testproject works', false)
|
124
|
+
end
|
125
|
+
|
126
|
+
def test_compile_debuginfo_map
|
127
|
+
_test_compile_and_output({:debuginfo => true, :map => :detail},
|
128
|
+
'D+: testproject works', true)
|
129
|
+
end
|
130
|
+
|
131
|
+
def test_compile_debuginfo_only_off
|
132
|
+
_test_compile_and_output({:debuginfo => false},
|
133
|
+
'testproject works')
|
134
|
+
end
|
135
|
+
|
136
|
+
def test_compile_debug_debuginfo
|
89
137
|
_test_compile_and_output({:debug => true, :debuginfo => true},
|
90
|
-
'D+: testproject works')
|
138
|
+
'D+: testproject works', true)
|
91
139
|
end
|
92
140
|
|
93
141
|
def test_compile_with_resources
|
@@ -155,6 +203,13 @@ public
|
|
155
203
|
'testproject works-=WITH EXPLICIT LIBS=-')
|
156
204
|
end
|
157
205
|
|
206
|
+
def test_compile_with_explicit_libs_twice
|
207
|
+
test_compile_with_explicit_libs
|
208
|
+
# invoke 'test:compile' and run again but without 'test:prepare'
|
209
|
+
_test_compile_and_output(nil,
|
210
|
+
'testproject works-=WITH EXPLICIT LIBS=-')
|
211
|
+
end
|
212
|
+
|
158
213
|
def test_compile_with_explicit_and_implicit_libs
|
159
214
|
paths = ['./ExplicitLib/']
|
160
215
|
_test_compile_and_output({:defines => 'LIBS,EXPLICIT_LIBS',
|
@@ -56,6 +56,24 @@ module DelphiAndroidTests
|
|
56
56
|
assert_equal 'Test project comment', @info['Comments']
|
57
57
|
end
|
58
58
|
|
59
|
+
def test_deploy_files_Android_implicit_debug_configuration
|
60
|
+
tested_deploymentFiles = []
|
61
|
+
tested_deploymentFiles_prefixes = { 36 => 'l', 48 => 'm', 72 => 'h', 96 => 'xh', 144 => 'xxh'}
|
62
|
+
[36, 48, 72, 96, 144].each do |n|
|
63
|
+
tested_deploymentFiles << '$(BDS)\bin\Artwork\Android\FM_LauncherIcon_%dx%d.png,res\drawable-%sdpi\,1,ic_launcher.png' % [n, n, tested_deploymentFiles_prefixes[n]]
|
64
|
+
end
|
65
|
+
tested_deploymentFiles << 'project_so,library\lib\armeabi\,1,libTestProject.so'
|
66
|
+
tested_deploymentFiles << '$(BDS)\lib\android\debug\classes.dex,classes\,1,classes.debug.dex'
|
67
|
+
tested_deploymentFiles << 'external\module.ext,.\assets\internal\\\\,1,'
|
68
|
+
tested_deploymentFiles << 'external\predefined.db,.\assets\internal\\\\,1,'
|
69
|
+
tested_deploymentFiles << '$(BDS)\lib\android\debug\mips\libnative-activity.so,library\lib\mips\,1,libTestProject.debug.so'
|
70
|
+
tested_deploymentFiles << '$(BDS)\lib\android\debug\armeabi\libnative-activity.so,library\lib\armeabi\,1,libTestProject.so'
|
71
|
+
tested_deploymentFiles << 'resources\some-deployment-file-with-operation-eq-0-class,.\,1,release.conf'
|
72
|
+
deploymentfiles = @info.deploymentfiles('Android', nil)
|
73
|
+
|
74
|
+
_test_deploy_files(deploymentfiles, tested_deploymentFiles)
|
75
|
+
end
|
76
|
+
|
59
77
|
def test_deploy_files_Android_Debug
|
60
78
|
tested_deploymentFiles = []
|
61
79
|
tested_deploymentFiles_prefixes = { 36 => 'l', 48 => 'm', 72 => 'h', 96 => 'xh', 144 => 'xxh'}
|
@@ -68,6 +86,7 @@ module DelphiAndroidTests
|
|
68
86
|
tested_deploymentFiles << 'external\predefined.db,.\assets\internal\\\\,1,'
|
69
87
|
tested_deploymentFiles << '$(BDS)\lib\android\debug\mips\libnative-activity.so,library\lib\mips\,1,libTestProject.debug.so'
|
70
88
|
tested_deploymentFiles << '$(BDS)\lib\android\debug\armeabi\libnative-activity.so,library\lib\armeabi\,1,libTestProject.so'
|
89
|
+
tested_deploymentFiles << 'resources\some-deployment-file-with-operation-eq-0-class,.\,1,release.conf'
|
71
90
|
deploymentfiles = @info.deploymentfiles('Android', 'Debug')
|
72
91
|
|
73
92
|
_test_deploy_files(deploymentfiles, tested_deploymentFiles)
|
@@ -77,11 +96,19 @@ module DelphiAndroidTests
|
|
77
96
|
tested_deploymentFiles = []
|
78
97
|
# libnative-activity.so must present both in Release and Debug configurations
|
79
98
|
tested_deploymentFiles << '$(BDS)\lib\android\debug\mips\libnative-activity.so,library\lib\mips\,1,libTestProject.release.so'
|
80
|
-
tested_deploymentFiles << 'some
|
99
|
+
tested_deploymentFiles << 'resources\some-deployment-file-from-enabled.release.conf,.\,1,enabled.release.conf.file'
|
100
|
+
tested_deploymentFiles << 'resources\some-disabled-deployment-file-from-disabled.release.conf,.\,1,disabled.release.conf.file'
|
81
101
|
deploymentfiles = @info.deploymentfiles('Android', 'Release')
|
82
102
|
|
83
103
|
_test_deploy_files(deploymentfiles, tested_deploymentFiles)
|
84
104
|
end
|
105
|
+
|
106
|
+
def test_deploy_files_Android_incorrect_configuration
|
107
|
+
tested_deploymentFiles = []
|
108
|
+
deploymentfiles = @info.deploymentfiles('Android', 'absent configuration')
|
109
|
+
|
110
|
+
assert_equal deploymentfiles, tested_deploymentFiles
|
111
|
+
end
|
85
112
|
end
|
86
113
|
|
87
114
|
end
|
@@ -56,6 +56,20 @@ module DelphiAndroidTests
|
|
56
56
|
assert_equal 'Test project comment', @info['Comments']
|
57
57
|
end
|
58
58
|
|
59
|
+
def test_deploy_files_Android_implicit_debug_configuration
|
60
|
+
tested_deploymentFiles = []
|
61
|
+
tested_deploymentFiles_prefixes = { 36 => 'l', 48 => 'm', 72 => 'h', 96 => 'xh', 144 => 'xxh'}
|
62
|
+
[36, 48, 72, 96, 144].each do |n|
|
63
|
+
tested_deploymentFiles << '$(BDS)\bin\Artwork\Android\FM_LauncherIcon_%dx%d.png,res\drawable-%sdpi\,1,ic_launcher.png' % [n, n, tested_deploymentFiles_prefixes[n]]
|
64
|
+
end
|
65
|
+
tested_deploymentFiles << 'project_so,library\lib\armeabi\,1,libTestProject.so'
|
66
|
+
tested_deploymentFiles << '$(BDS)\lib\android\debug\classes.dex,classes\,1,classes.debug.dex'
|
67
|
+
tested_deploymentFiles << 'resources\some-deployment-file-with-operation-eq-0-class,.\,1,release.conf'
|
68
|
+
deploymentfiles = @info.deploymentfiles('Android', nil)
|
69
|
+
|
70
|
+
_test_deploy_files(deploymentfiles, tested_deploymentFiles)
|
71
|
+
end
|
72
|
+
|
59
73
|
def test_deploy_files_Android_Debug
|
60
74
|
tested_deploymentFiles = []
|
61
75
|
tested_deploymentFiles_prefixes = { 36 => 'l', 48 => 'm', 72 => 'h', 96 => 'xh', 144 => 'xxh'}
|
@@ -64,6 +78,7 @@ module DelphiAndroidTests
|
|
64
78
|
end
|
65
79
|
tested_deploymentFiles << 'project_so,library\lib\armeabi\,1,libTestProject.so'
|
66
80
|
tested_deploymentFiles << '$(BDS)\lib\android\debug\classes.dex,classes\,1,classes.debug.dex'
|
81
|
+
tested_deploymentFiles << 'resources\some-deployment-file-with-operation-eq-0-class,.\,1,release.conf'
|
67
82
|
deploymentfiles = @info.deploymentfiles('Android', 'Debug')
|
68
83
|
|
69
84
|
_test_deploy_files(deploymentfiles, tested_deploymentFiles)
|
@@ -71,13 +86,22 @@ module DelphiAndroidTests
|
|
71
86
|
|
72
87
|
def test_deploy_files_Android_Release
|
73
88
|
tested_deploymentFiles = []
|
74
|
-
tested_deploymentFiles << 'some
|
89
|
+
tested_deploymentFiles << 'resources\some-deployment-file-from-enabled.release.conf,.\,1,enabled.release.conf.file'
|
75
90
|
# classes.dex must present both in Release and Debug configurations
|
76
91
|
tested_deploymentFiles << '$(BDS)\lib\android\debug\classes.dex,classes\,1,classes.release.dex'
|
92
|
+
tested_deploymentFiles << 'resources\some-deployment-file-from-enabled.release.conf,.\,1,enabled.release.conf.file'
|
93
|
+
tested_deploymentFiles << 'resources\some-disabled-deployment-file-from-disabled.release.conf,.\,1,disabled.release.conf.file'
|
77
94
|
deploymentfiles = @info.deploymentfiles('Android', 'Release')
|
78
95
|
|
79
96
|
_test_deploy_files(deploymentfiles, tested_deploymentFiles)
|
80
97
|
end
|
98
|
+
|
99
|
+
def test_deploy_files_Android_incorrect_configuration
|
100
|
+
tested_deploymentFiles = []
|
101
|
+
deploymentfiles = @info.deploymentfiles('Android', 'absent configuration')
|
102
|
+
|
103
|
+
assert_equal deploymentfiles, tested_deploymentFiles
|
104
|
+
end
|
81
105
|
end
|
82
106
|
|
83
107
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-delphi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey Shumkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -189,9 +189,9 @@ files:
|
|
189
189
|
- test/resources/testproject-android/local.resources.txt
|
190
190
|
- test/resources/testproject-android/release.dcc.cfg
|
191
191
|
- test/resources/testproject-android/resources.rc
|
192
|
+
- test/resources/testproject-android/resources/some-deployment-file-with-operation-eq-0-class
|
192
193
|
- test/resources/testproject/ExplicitLib/ExplicitLibUnit.pas
|
193
194
|
- test/resources/testproject/Rakefile.rb
|
194
|
-
- test/resources/testproject/extended_resources.dres
|
195
195
|
- test/resources/testproject/lib/AnyLib/LibUnit.pas
|
196
196
|
- test/resources/testproject/local.resources.ext.txt
|
197
197
|
- test/resources/testproject/local.resources.txt
|
@@ -275,9 +275,9 @@ test_files:
|
|
275
275
|
- test/resources/testproject-android/local.resources.txt
|
276
276
|
- test/resources/testproject-android/release.dcc.cfg
|
277
277
|
- test/resources/testproject-android/resources.rc
|
278
|
+
- test/resources/testproject-android/resources/some-deployment-file-with-operation-eq-0-class
|
278
279
|
- test/resources/testproject/ExplicitLib/ExplicitLibUnit.pas
|
279
280
|
- test/resources/testproject/Rakefile.rb
|
280
|
-
- test/resources/testproject/extended_resources.dres
|
281
281
|
- test/resources/testproject/lib/AnyLib/LibUnit.pas
|
282
282
|
- test/resources/testproject/local.resources.ext.txt
|
283
283
|
- test/resources/testproject/local.resources.txt
|
Binary file
|